how to find number of columns in a table in sql server 2000
and 2005 also
Answer Posted / harshad
select count(*) from information.schema.columns
where table_name='tablename'
//where tablename is name of your sql table.
//do not prefix table name with .dbo
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the types of sql server?
What are the different types of sub-queries?
Why should you use or avoid select * statements?
Explain what role entity and relationship play in an ER diagram.
How do users use Report Builder with SQL Server data sources?
How do you delete a data source?
What is difference between delete and truncate commands?
How to make conditional sum in ssrs?
List down some advantages of sql stored procedure?
Explain SSRS Architecture?
What is user defined datatypes and when you should go for them?
What are the advantages of the mirroring?
Explain few examples of RDBMS?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
Why do we use stored procedures in sql server?