how to find number of columns in a table in sql server 2000
and 2005 also

Answer Posted / rajkumar v

select count(*) from information_schema.columns where
table_name='Emp'

EMP table name

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain identity in sql server?

558


How to drop existing views from a database in ms sql server?

521


what are database files and filegroups? : Sql server database administration

495


What are the main sources of data?

584


What do you understand by mirroring and mention the advantages of the mirroring?

570






Write the queries for commands like Create Table, Delete table, Drop Table etc.

602


What is tempdb database? : SQL Server Architecture

594


How do you know if sql server is running on your local system?

530


What are the different editions available in sql server 2000?

582


Disadvantages of the indexes?

585


What are the types of lock supported by ?

606


Write query to return all rows sql?

607


What is explicit mode in sql server?

525


Can the query output be sorted by multiple columns in ms sql server?

547


What happens if null values are involved in datetime operations?

523