查询表名为History的所有列名
1
|
select name from syscolumns where id=object_id('History' )
|
查询表名为History的所有列名个数
1
|
select count ( name ) from syscolumns where id=object_id('History' )
|
或者
1
2
3
|
select count (syscolumns. name )
from syscolumns ,sysobjects
where syscolumns.id=sysobjects.id and sysobjects. name = 'History'
|