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

Answer Posted / saravanan p

select count(column_Name) from information_schema.columns
where table_name='tableName'

Is This Answer Correct ?    8 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is a schema in sql server 2005? : Sql server database administration

504


Difference between LEN() and DATALENGTH() in sql server ?

582


Give a example to search fr a string in all stored procedure in sql server.

518


What is the difference between varchar and varchar(max) datatypes?

538


How should i optimize the time for execution of stored procedure having single input and many output from the different tables?

1456






Difference between uniqe index and uniqe constraint?

534


What is the difference between NOROW and LOCKROW?

2218


What is the sql case statement used for?

551


Explain about the command-line tool SQLCMD?

545


How the authentication mode can be changed?

591


What do you understand by integration services in sql server?

539


What are system databases in ms sql server?

523


How to rename an existing column with the "sp_rename" stored procedure in ms sql server?

540


What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas

533


How to create a new login name in ms sql server?

538