how to find number of columns in a table in sql server 2000
and 2005 also
Answer Posted / ram&saran
SELECT COUNT(*) FROM SYS.COLUMNS WHERE ID=(SELECT * FROM
SYS.OBJECT WHERE NAME='TABLENAME')
| Is This Answer Correct ? | 1 Yes | 1 No |
Post New Answer View All Answers
How to check table values in sql server?
How optimize sql query with multiple joins in sql server?
Can one drop a column from a table?
Do you know what is similarity and difference between truncate and delete in sql?
Is candidate a key?
What is the maximum number of index per table?
What is an execution plan?
When setting replication, is it possible to have a publisher as 64 bit sql server and distributor or subscribers as a 32 bit sql server?
What are the basic features of a trigger in ms sql server?
Do you know hot add cpu in sql server 2008?
Can you explain what are commit and rollback in sql?
What is the order in which the sql query is executed?
Explain about system stored procedure?
What is reportserver and reportservertempdb ?
Explain the difference between cross join and full outer join?