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

when would you go for denormalization? : Sql server database administration

563


Tell me what is fill factor?

632


What do you mean by authentication modes in sql server?

697


What do you understand by mirroring and mention the advantages of the mirroring?

675


How do I view a stored procedure in sql server?

635






What are the differences between “row_number()”, “rank()” and “dense_rank()”?

614


Do you know what is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?

652


What are different types of database indexes?

613


What is report server project?

114


What is history table in sql server?

579


What is data modeling and Reterminal integrity?

1582


Which are the two editions in which SQL Azure database available?

109


What type of Index will get created after executing the above statement?

736


Does a server store data?

576


How can I add Reporting Services reports to my application?

97