select count( * ) from sysobjects a join syscolumns b on a.id = b.id where a.name = '表名'
来源: http://www.bubuko.com/infodetail-1864314.html