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

Which sql server is best?

723


What are the different types of locks in the database?

649


What is the difference between varchar and nvarchar datatypes?

759


What’s the distinction between dropping a info and taking a info offline?

805


What are the restrictions that views have to follow? : SQL Server Architecture

741






Do you know what are different types of replication in sql server?

735


What is use of except clause? How it differs from not in clause?

755


What is the difference between drop table and truncate table?

655


What is the difference between stored procedure and functions?

774


How to replace given values with null using nullif()?

719


 Explain what is sql override for a source taLle in a mapping?

747


What is 2nf normalization form?

776


What is pessimistic concurrency?

707


Explain Normalization and DE normalization

793


Please explain what is “asynchronous” communication in sql server service broker?

691