SQL Server Performance

Nnumbar of coulmns

Discussion in 'Getting Started' started by Neelam, May 21, 2007.

  1. Neelam New Member

    Is there any way to extract number of coulmns in a table
  2. dineshasanka Moderator

    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

    Visit my Blog at
  3. Madhivanan Moderator

    Select count(*) from information_schema.columns
    where table_name='table name'


    Failing to plan is Planning to fail

Share This Page