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
Is it possible to replicate data from sql server to oracle? : sql server replication
Is truncate a dml command?
How do I view a stored procedure in sql server query?
Where sql server usernames and passwords are stored in a sql server?
What is trigger explain with program?
How can a user-defined datatype be created?
How to list all user defined functions in the current database?
What are the properties of primary key?
State a few properties of relational databases?
What are 3 ways to get a count of the number of records in a table?
Explain what is the difference between a local and a global temporary table?
How to create user messages with print statements in ms sql server?
What are commit and rollback in sql?
Which language is supported by sql server?
How to throw custom exception in Stored Procedure?