select count(1) from syscolumns where id = object_id('tbname')
或者
select * from syscolumns where id = object_id('tbname')
或
SELECT MAX(colid) FROM syscolumns WHERE id=OBJECT_ID('table')
转载于:https://www.cnblogs.com/myAirport/archive/2012/02/29/2372978.html