查询某个表里有多少列,以及殊数据类型及长度.

要写文档了,一个一个对太麻烦了,就用系统表查出

SELECT name AS name,
          (SELECT systypes.name
         FROM systypes
         WHERE (systypes.xtype = syscolumns.xtype AND systypes.status <> 1)) AS type,
      prec
FROM syscolumns
WHERE (id = (select sysobjects.id from sysobjects where sysobjects.name='CS_Accept_Lawsuit')) 

你可能感兴趣的:(查询某个表里有多少列,以及殊数据类型及长度.)