select syscolumns.name,systypes.name,syscolumns.length
from syscolumns join sysobjects on syscolumns.id=sysobjects.id join systypes on systypes.xtype=syscolumns.xtype
where sysobjects.name=@TableName
获取某个表的列名类型和长度
最新推荐文章于 2021-01-20 01:37:08 发布
select syscolumns.name,systypes.name,syscolumns.length
from syscolumns join sysobjects on syscolumns.id=sysobjects.id join systypes on systypes.xtype=syscolumns.xtype
where sysobjects.name=@TableName