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 a view and what are its advantages?

694


What is a result set object returned by odbc_exec()?

554


What is an expression in ms sql server?

575


What are the limitations in ssrs on sql server express edition?

139


How to find index size for each index on table?

593






What are rows and columns?

532


Mention the command used to rename the database.

538


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?

629


How we can refresh the view?

602


What are the advantages of sql azure?

116


What is an execution plan? How would you view the execution plan?

553


Which command is used for user defined error messages?

573


In my application I have a process which picks the scanned files (tif format) from a shared location and it links to application and shown on it.The actuall issue is that my process picks the file before it is completly written or scanned which results in displaying few parts of the image or incomplete image.I need to check if the file is not completly scanned or written then do not link it to application.Please help if any body tell me that how can i check that file is in written phase or locked through DTS.thanking you in advance

1561


Difference between group by clause and having clause in SQL?

574


How to return the top 5 rows from a select query in ms sql server?

604