get basic SQL Server table structure information

后端 未结 6 1995
心在旅途
心在旅途 2021-02-05 04:21

I can get the number of columns in an SQL Server database with this:

SELECT COUNT(*)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = \'Address\'
6条回答
  •  清歌不尽
    2021-02-05 04:26

    For total columns information use below syntax : Use "DBName" go Exec SP_Columns "TableName"

    For total table information use below syntax : Use "DBName" go Exec SP_help "Table Name"

提交回复
热议问题