用以下语句可以查看表的一些基本信息(不包括约束)select c.name,a.name ,b.name ,a.length, a.isnullable from syscolumns a, systypes b ,sysobjects c where a.xtype=b.xusertype and a.id =c.id and c. type ='U'
特定表: select c.name,a.name ,b.name ,a.length, a.isnullable from syscolumns a, systypes b ,sysobjects c where a.xtype=b.xusertype and a.id =c.id and c. type ='U' and c.id= object_id('tablename')
select c.name,a.name ,b.name ,a.length, a.isnullable from syscolumns a, systypes b ,sysobjects c where a.xtype=b.xusertype and a.id =c.id and c. type ='U' and c.id= object_id('tablename')