将SQLServer中所有表的列信息显示出来计算机等级考试
文章作者 100test 发表时间 2009:10:07 17:58:17
来源 100Test.Com百考试题网
将SQL Server中所有表的列信息显示出来:
SELECT SysObjects.Name as tb_name, SysColumns.Name as col_name,
SysTypes.Name as col_type, SysColumns.Length as col_len, isnull
(SysProperties.Value,SysColumns.Name) as col_memo,
case when SysColumns.name in
(0select 主键=a.name来源:考试大
FROM syscolumns a
inner join sysobjects b on a.id=b.id and
b.xtype= U and b.name<.>.