基于SQL server 2005以上的版本,查找表字段语句如下:
select B.name, C.name, B.max_length, B.is_nullable
from sys.objects A
inner join sys.columns B
on A.object_id = B.object_id
inner join Sys.systypes C
on B.system_type_id = C.xusertype
where A.name = '表名'
order by column_id