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 is cursors?
What are translations and its use? : sql server analysis services, ssas
Tell me about the approaches which you used to counter the DI problems.
How do I create a trace in sql server?
Explain about the command-line tool SQLCMD?
Explain something about security and SQL Azure?
Explain intellisense for query editing
How to create a new schema in a database?
What is transaction server implicit?
What is tablix?
What does nvl stand for?
What is sqlservr.exe - process - sql server (sqlex?press)?
What are the different types of triggers in SQL SERVER?
what are different types of backups available in sql server? : Sql server database administration
how many clustered indexes can be created on a table? : Sql server database administration