select count(*) from sysobjects a join syscolumns b on a.id=b.id where a.name=‘表名‘
SqlServer知识总结
原文:http://www.cnblogs.com/dakang/p/6145430.html