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
How retrieve field names from the table in SQL through JAVA code?
Explain can SSRS reports Cache results?
How to choose all records from the table?
Explain what are the restrictions while creating batches in sql server?
What are the diifferences between the ms sql server vs mysql?
Differentiate between truncate vs delete in mssql?
Can the query output be sorted by multiple columns in ms sql server?
What is difference between standardization and normalization?
Can we check locks in database? If so, how can we do this lock check?
How to recover from sql injection? : sql server security
Explain candidate key, alternate key, and composite key?
What are secondary xml indexes?
What is a functions and types in sql server?
What is relationship? What number of sorts of relationship are there?
What is a dataset and what are the different types of datasets?