SELECT a.name AS tablename, b.name AS colName, c.name AS colType, c.length AS colLength FROM sys.sysobjects AS a INNER JOIN sys.syscolumns AS b ON a.id = b.id AND a.xtype = 'U' INNER JOIN sys.systypes AS c ON b.xtype = c.xusertype where tablename='表名'
可以去掉where条件保存为视图方便查询使用。