查询列数

select count(name) from syscolumns where id=(select id from sysobjects where xtype='u' and name='表名')
原文地址:https://www.cnblogs.com/djh/p/621571.html