SQL Server 查询数据库表的列数 1 select count(*) from sysobjects a 2 join syscolumns b 3 on a.id=b.id 4 where a.name='表名' 5 go