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

How to reaname table name without using sp_Rename in sql server..?

533


Are there issues when exporting SSRS reports into Microsoft Excel? When my users are trying to export a SSRS report into Microsoft Excel, one or two columns in the report appear to merge together. Why might this be?

134


What happens if you add a new index to large table?

513


i have made a project i vb.net n created a .exe of it after installing it in to any pc, the database (sql express) is not geting accesed i.e the aplication cuts the link of the database, so plz help in this matter.

1379


Can you explain what is indexed view? How to create it?

535






How to enable tcp/ip protocol on a sql server?

594


What is the latest version of microsoft sql server?

488


What are different types of raid configurations? : SQL Server Architecture

577


What is bcp? When does it use?

515


What is left outer join in sql server joins?

559


Do you know data definition language, data control language and data manipulation language?

634


Where do you find the default Index fill factor and how to change it?

609


do views contain data ?

590


How can you check the level of fragmentation on a table?

612


How to create dbo table in sql server?

526