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

Answer Posted / bhaskar

select count(*) from syscolumns where id=(select id from
Sysobjects where [name]='Table_Name')

Is This Answer Correct ?    13 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?

1619


How to use clusters?

543


What are the different subsets of sql?

940


What is self contained multi valued query?

548


What the difference between UNION and UNIONALL?

563






What is the syntax to execute the sys.dm_db_missing_index_details? : sql server database administration

615


What is sparse columns of sql server 2008?

595


How to create an multi-statement table-valued function?

521


What is resource governor in sql server?

539


Explain what is it unwise to create wide clustered index keys?

536


How to execute a sql statement using odbc_exec()?

564


How to list all login names on the ms sql server?

525


What is deploy, process and build? : sql server analysis services, ssas

560


What is policy based management (pbm)? : sql server database administration

580


What is normalization of database?

593