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

Answer Posted / sudhir kumar

IN SQLSERVER 20005


SELECT COUNT(COLUMN_NAME) FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'TABLENAME'


try in sql server 2000

Is This Answer Correct ?    29 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Does sql server 2000 full-text search support clustering?

499


What is the web service used for reporting services?

96


What is parameterized reports in ssrs ?

105


explain what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration

498


Why the trigger fires multiple times in single login?

715






What is difference between temp table and cte?

523


What is a view and what are its advantages?

681


What is sql injection? How to protect against sql injection attack?

545


What are the different types of Indexes available in SQL Server?

510


Where can you add custom error messages to sql server?

573


As per your opinion what are the five top responsibilities of a dba? : sql server database administration

600


Explain Geometry datatype in sql server 2008 with example

572


What is an index in a database?

526


How to locate and take substrings with charindex() and substring() functions?

502


What is the recommended total size of your memory optimized tables?

516