SqlServer字段说明查询 SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value] )) AS [字段说明] FROM sys.tables AS t INNER JOIN sys.columns AS c ON t.object_id = c.object_id LEFT JOIN sys.extended_properties AS ep AND t.name='TableName' 快速查看表结构 --快速查看表结构(比较全面的) T…
--表描述 SELECT tbs.name 表名,ds.value 描述 FROM sys.extended_properties ds LEFT JOIN sysobjects tbs ON ds.major_id=tbs.id and tbs.name='Warrant_BaseInfo';--表名 --快速查看表结构 THEN obj.name ELSE '' END AS 表名, col.colorder AS 序号 , col.name AS 列名 , ISNULL(ep.[value…
--快速查看表结构(比较全面的) THEN obj.name ELSE '' END AS 表名, col.colorder AS 序号 , col.name AS 列名 , ISNULL(ep.[value], '') AS 列说明 , t.name AS 数据类型 , col.length AS 长度 , ) AS 小数位数 , THEN '√' ELSE '' END AS 标识 , FROM dbo.sysindexes si INNER JOIN dbo.sysindexkeys si…
DECLARE @tableName NVARCHAR(MAX);SET @tableName = N'UserIntegralExchange'; --表名!!! SELECT CASE WHEN col.colorder = 1 THEN obj.name ELSE '' END AS 表名 , col.colorder AS 序号 , col.name AS 列名 , ISNULL(ep.[value], '') AS 列说明 , t.name AS 数据类型 , col.length…
--快速查看表结构(比较全面的) THEN obj.name ELSE '' END AS 表名, col.colorder AS 序号 , col.name AS 列名 , ISNULL(ep.[value], '') AS 列说明 , t.name AS 数据类型 , col.length AS 长度 , ) AS 小数位数 , THEN '√' ELSE '' END AS 标识 , FROM dbo.sysindexes si INNER JOIN dbo.sysindexkeys si…
--表描述 SELECT tbs.name 表名,ds.value 描述 FROM sys.extended_properties ds LEFT JOIN sysobjects tbs ON ds.major_id=tbs.id and tbs.name='Warrant_BaseInfo';--表名 --快速查看表结构 THEN obj.name ELSE '' END AS 表名, col.colorder AS 序号 , col.name AS 列名 , ISNULL(ep.[value…
SELECT t.[name] AS 表名,c.[name] AS 字段名,cast(ep.[value] )) AS [字段说明] FROM sys.tables AS t INNER JOIN sys.columns AS c ON t.object_id = c.object_id LEFT JOIN sys.extended_properties AS ep ON ep.major_id = c.object_id AND ep.minor_id = c.column_id WHERE…
快速查看表对的就说明,及表字段描述及字段类型 --表描述 SELECT tbs.name 表名,ds.value 描述 FROM sys.extended_properties ds LEFT JOIN sysobjects tbs ON ds.major_id=tbs.id and tbs.name='Warrant_BaseInfo';--表名 --快速查看表结构 THEN obj.name ELSE '' END AS 表名, col.colorder AS 序号 , col.name A…