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

Answer Posted / surbhi

SELECT count(*) FROM INFORMATION_SCHEMA.COLUMNS where
table_name='tablename'

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a Master database in SQL server ?

554


what is difference between NULL and ISNULL in SQL Server 2008?

584


what is the difference between a primary key and a unique key? : Sql server database administration

533


What are the types of containers in ssis?

605


What happens when transaction log is full?

515






What is a view in sql?

584


What is sql language?

555


Explain in details security in SQL azure?

97


How to list all user defined functions in the current database?

518


What is the full form of dql?

518


What are joins in sql and what are the different types of joins?

558


Explain ranking functions?

614


How to delete all rows with truncate table statement in ms sql server?

497


Explain view in sql server?

629


How to include date and time values in sql statements?

636