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

Explain the steps needed to create a scheduled job?

674


What happens if you are trying to access a schema not owned by you?

716


Define self join?

789


How do I view a trc file?

681


what are the important architecture components of SSRS?

112






How many types of relations are there between dimension and measure group? : sql server analysis services, ssas

936


as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration

726


Differentiate sql server reporting services vs. Crystal reports?

166


How to create a dml trigger using create trigger statements?

730


Explain “@@rowcount” and “@@error” in sql server?

722


Describe the functionalities that views support.

845


Explain the ways to controlling cursor behavior?

701


Do you know sql server 2008 introduces automatic auditing?

683


What is a transact-sql statement?

709


You are doing log shipping due to some reasons it is failing. How you will proceed from there

1747