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

What are the steps you should follow to start sql server in single-user mode?

490


How does index makes search faster?

607


What are the different types of sql server replication? : sql server replication

630


How to delete duplicate rows?

557


Mention the command used to rename the database.

536






How to store and query spatial data?

564


What are key constraints?

520


Are null values the same as that of zero or a blank space?

582


How to defragment table indexes?

558


Where is trigger in sql server?

547


How is sql server used?

552


Why should one not prefix user stored procedures with ‘sp_’?

601


Describe different Processing Modes offered by SSRS?

164


Do you know how to store and query spatial data?

611


How many files can a database contain in sql server?how many types of data files exists in sql server? How many of those files can exist for a single database?

650