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

Answer Posted / sudhir kumar

IN SQLSERVER 20005


SELECT COUNT(COLUMN_NAME) FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'TABLENAME'


try in sql server 2000

Is This Answer Correct ?    29 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is shrink log file?

587


What are the advantages of using stored procedures?

605


whats the maximum size of view state??

1814


Can the query output be sorted by multiple columns in ms sql server?

641


How will you monitor replication latency in transactional replication? : sql server replication

704






Explain data warehousing in sql server?

692


What are binary string data types in ms sql server?

735


How to write a query with a left outer join in ms sql server?

665


How retrieve field names from the table in SQL through JAVA code?

1476


OPTIMIZATION OF SP,CURSOR,TRIGGERS

2289


Which operator do you use to return all of the rows from one query except rows are returned in a second query?

660


what are triggers? : Sql server database administration

572


explain extended properties

632


Explain different types of index?

686


Sql studio em braces a variety of capabilities, but will I need them all? Is there a simpler product ? : sql server management studio

598