SELECT TOP 100 PERCENT c.colid AS 序号, o.name AS 表名, c.name AS 列名,
t.name AS 类型, c.length AS 长度, c.isnullable 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
where o.name = '表名' and c.name = '列名'
ORDER BY o.name, c.colid
查询一个表的某一个列的属性
最新推荐文章于 2021-04-12 20:20:38 发布