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 sql server executes a statement with nested subqueries?
Where are sql server user names and passwords stored in sql server?
What are the differences between DDL, DML and DCL in SQL?
Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?
What are the source of constraints?
How ssrs maintain security?
What do you mean by cardinality?
What is clr ddl trigger?
What do you mean by an execution plan? Why is it used?
what are acid properties? : Sql server database administration
What is the beast way to write CTE in SQL Server ?
what is a self join? : Sql server database administration
What is the correct order of the logical query processing phases?
Why main is user defined function?
When is update_statistics command used?