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

Answer Posted / saravanan p

select count(column_Name) from information_schema.columns
where table_name='tableName'

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of replication you can set up in sql server?

531


What is read committed?

613


What is cached report?

106


You want to check the syntax of a complicated update sql statement without executing it. What command should you use?

493


what are the three command line utilities and what are their primary functions?

101






What are the recovery models for a database?

621


What are the different types of collation sensitivity?

561


Do you know what is blocking?

545


How to create a user to access a database in ms sql server using "create user" statements?

530


What do you understand by triggers and mention the different types of it?

490


How to download and install microsoft sql server management studio express?

569


Difference between primary key and clustered index?

509


Explain query editor regions

621


How to generate create table script on an existing table in ms sql server?

649


What is an example of a foreign key?

514