22,302
社区成员




select a.name,a.length,b.name from syscolumns a,systypes b,sysobjects c
where a.xtype=b.xtype and a.id=c.id and c.name= 'table'
结果如下:
name length name
id 4 int
na 100 nvarchar
ps 100 nvarchar
na 100 sysname
ps 100 sysname
name length name
id 4 int
na 100 nvarchar
ps 100 nvarchar
select a.name,a.length,b.name from syscolumns a,systypes b,sysobjects c
where a.xtype=b.xtype and a.id=c.id and c.name= 'table' and charindex('sysname',b.name) = 0
--你的是sql 200X 多少的?