Friday, March 19, 2010

How to Find Number of Columns in a Table

Below script find out how many columns are there in  a table


SELECT COUNT(1) 'No of Column(s)' FROM SYS.SYSCOLUMNS
WHERE ID = OBJECT_ID('TableName')


Happy Quering

0 Comments:

blogger templates | Make Money Online