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

Answer Posted / surbhi

SELECT count(*) FROM INFORMATION_SCHEMA.COLUMNS where
table_name='tablename'

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about builtinadministrator?

582


What are the purposes and advantages stored procedure?

491


How do you test your database? : sql server database administration

520


How many types of subqueries are there in sql server?

461


How to retrieve error messages using mssql_get_last_message()?

519






How many types of triggers in sql server?

513


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60

1711


What happens if we shrink log file in sql server?

509


Explain the first normal form(1nf)?

547


what is a traditional network library for sql servers? : Sql server database administration

458


Can you explain what are the restrictions applicable while creating views? : SQL Server Architecture

488


what is the information that can be stored inside a bit column? : Sql server database administration

513


Does a sql server 2005 select statement require a from?

568


Explain triggers?

550


Your table has a large character field there are queries that use this field in their search clause what should you do?

497