发布网友 发布时间:2022-04-26 23:51
共1个回答
热心网友 时间:2022-04-08 23:30
SELECT TOP 100 PERCENT c.colid AS 序号, o.name AS 表名, c.name AS 列名,
t.name AS 类型, c.length AS 长度, c.isnullable AS 允许空,
CAST(m.[value] AS Varchar(100)) AS 说明
FROM dbo.syscolumns c INNER JOIN
dbo.sysobjects o ON o.id = c.id AND objectproperty(o.id, N'IsUserTable') = 1 AND
o.name <> 'dtproperties' INNER JOIN
dbo.systypes t ON t.xusertype = c.xusertype LEFT OUTER JOIN
dbo.sysproperties m ON m.id = o.id AND m.smallid = c.colorder
ORDER BY o.name, c.colid
什么也不用修改就可以了