如何在查询分析器MS SQL Server中查看表结构

时间:2022-03-20 15:41:36

I am trying to check the table structure of given table in Query Analyzer.

我试图在查询分析器中检查给定表的表结构。

I am trying to see the anything equivalent Of Describe in Mysql in SQL server

我试图在SQL服务器中看到与Mysql中的Describe相同的东西

I found sp_help, but that gives me more than what I expect.

我找到了sp_help,但这给了我超过我的期望。

1 个解决方案

#1


2  

Try

SELECT * 
FROM   information_schema.columns
WHERE  table_name = 'YourTable' 

sp_columns also works but that's 2005 and up and you reference "Query Analyzer" which is for 2000

sp_columns也可以,但是2005年及以后你引用了2000年的“查询分析器”

#1


2  

Try

SELECT * 
FROM   information_schema.columns
WHERE  table_name = 'YourTable' 

sp_columns also works but that's 2005 and up and you reference "Query Analyzer" which is for 2000

sp_columns也可以,但是2005年及以后你引用了2000年的“查询分析器”