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

Answer Posted / vidit tyagi

SELECT Count(*)As Coloumns
FROM SysColumns
Where ID =
(SELECT ID FROM SysObjects Where Name = 'TableName')

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to download and install the scaled-down database adventureworkslt?

592


Explain different types of BACKUPs avaialabe in SQL Server? Given a particular scenario, how would you go about choosing a backup plan?

562


What is Transparent Data Encryption?

578


What are the steps to insert a table?

529


What are the different authentication modes in sql server?

556






What command do we use to rename a database?

603


What is Federation Root Database?

90


What is inner join? Explain with an example?

675


How many types of triggers are there?

558


What are “lost updates”?

601


Why olap is used?

552


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?

558


How to loop through result set objects using odbc_fetch_row()?

457


What are a database and a data warehouse?

558


How you trouble shoot when any job fails

1493