在sql server数据库的一个表中如何查询共有多少字段

select a.* from sys.columns a,sys.tables b
where a.object_id = b.object_id and b.name = '要查的表名'

原文地址:https://www.cnblogs.com/firstdream/p/6899224.html