how to find number of columns in a table in sql server 2000
and 2005 also
Answer Posted / kishore
select count(*) NoOfColumns from SYSCOLUMNS
WHERE id= (Select id from SYSOBJECTS where name = 'city')
In this querry may name is Tablename
Is This Answer Correct ? | 58 Yes | 23 No |
Post New Answer View All Answers
What are trace files?
Is foreign key a primary key?
What is data modeling and Reterminal integrity?
Why do you need a sql server?
Do you know what are the ways available in sql server to execute sql statements?
Does an index slow down updates on indexed columns?
How to change the data type of an existing column with "alter table" statements in ms sql server?
How would we use distinct statement? What is its use?
what is the difference between Tabular and Matrix report?
What is always encrypted?
what is a check constraint?
Where can you find the error log information? : sql server database administration
How to execute stored procedure and set temp table in sql server?
What is the contrast between sql and pl/sql?
How to select some specific rows from a table in ms sql server?