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 is user-defined multi-statement table-valued function?

827


What does asynchronous call backs means?

767


What stored by the model? : sql server database administration

708


What are out-of-range errors with date and time literals?

721


Define views.

753






Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?

654


How to disable a login name in ms sql server?

750


Define compound operators?

677


What are a scheduled jobs or what is a scheduled tasks?

653


Where can you add custom error messages to sql server?

776


What is difference between index and primary key?

794


What is index fragmentation in ms sql server?

771


what is datawarehouse?

830


Explain about protocol layer present in SQL server?

784


Mention the different authentication modes in sql server.

699