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
Difference between LEN() and DATALENGTH() in sql server ?
How to create a ddl trigger using "create trigger" statements?
Data table as parameter in sql server?
What is indexing explain it with an example?
Which tcp/ip port does sql server run on? How can it be changed?
What are 3 ways to get a count of the number of records in a table?
Give a example to search fr a string in all stored procedure in sql server.
What is the difference between value type and reference type?
Define views.
In what sequence sql statement is processed?
what is the difference in login security modes between v6.5 and 7.0? : Sql server database administration
What is single-user mode and what are the steps you should follow to start sql server in single-user mode?
How do you know if sql server is running on your local system?
explain what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
How to create sub reports?