sql中怎么获得数据表的字段数

sql中如何获得数据表的字段数?如何获得数据表的字段数?查询语句怎么写?[解决办法]select count(name) from

sql中如何获得数据表的字段数?
如何获得数据表的字段数?查询语句怎么写?

[解决办法]
select count(name) from syscolumns where id=object_id( '表名 ')