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

What is difference between stored procedure and user defined function?

553


What do you understand by SQL*Net?

619


What are synonyms?

531


What is transactional replication?

565


How to Improve the performencs of SQL Server 2005 exclude stored Procedure and Indexes?

1581






What are the two modes of authentication in sql server?

530


What is the use of for clause?

585


What is shared lock?

497


What is resultset concur_updatable?

586


Differentiate between mongodb vs. Sql server?

589


Explain go command in sql server?

549


Differentiate between ms sql server reporting services vs crystal reports?

495


How to trouble shoot if unable to connect SQL Server

1484


What is GUID in sql server?

647


Can a function call a stored procedure in sql server?

529