oracle has 'DESCRIBE' to get all the details of the table like wise does t/sql has any thing

后端 未结 3 1096
清酒与你
清酒与你 2021-01-16 04:56

oracle has \'DESCRIBE\' to get all the details of the table like wise does t/sql has any thing.

3条回答
  •  感情败类
    2021-01-16 05:47

    Sql-Server's sp_help is about as close as you get for something built-in. Remeber to put the tablename in as a parameter...:-)

    EXEC sp_help 'mytable'
    

    If you're in ssms, you can r-click your query window and opt to output results to text -- it's a little easier to read the output.

    ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_6tsql/html/913cd5d4-39a3-4a4b-a926-75ed32878884.htm

    Also -- you can write your own using the system tables (sys.objects, sys.columns, ...) I think 'DESCRIBE' just gives you column name, nullable, and type... so not nearly as much as sp_help provides.

提交回复
热议问题