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

Answer Posted / ajit kumar nayak

select count(*) from syscolumns sy,Sysobjects so
where
sy.id =so.id
and so.name = <table name>

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to execute a sql statement using odbc_exec()?

653


Differentiate between delete and truncate.

656


What are the different Topologies in which Replication can be configured?

750


According to you what goes into making the best database administrator? : sql server database administration

627


How to list all dsn entries on your local machine using odbc_data_source()?

645






what are acid properties? : Sql server database administration

574


What is the name of the system variable that returns the number of rows affected by a SQL statement?

659


What is difference between global temporary tables and local temporary tables?

768


What function does a database engine serve in the sql server?

664


What is bcp? When does it used?

640


How do I find information about the install locations for the various instances running on a computer?

641


What is the chart in report?

113


Detail about query optimizer?

701


Define right outer join?

628


What is built-in/administrator?

648