Nnumbar of coulmns | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Nnumbar of coulmns

Is there any way to extract number of coulmns in a table
Select count(SC.Name) from syscolumns SC inner join sysobjects SO on SC.Id = SO.Id
where SO.name = ‘TableName’
—————————————-
Contributing Editor, Writer & Forums Moderator
http://www.SQL-Server-Performance.Com Visit my Blog at
http://dineshasanka.spaces.live.com/

Also
Select count(*) from information_schema.columns
where table_name=’table name’ Madhivanan Failing to plan is Planning to fail
]]>