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

Answer Posted / vidit tyagi

SELECT Count(*)As Coloumns
FROM SysColumns
Where ID =
(SELECT ID FROM SysObjects Where Name = 'TableName')

Is This Answer Correct ?    6 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Tell me what is a linked server?

764


What do we have to check in database testing?

764


Is it possible to run multiple publications and different type of publications from the same distribution database? : sql server replication

733


Write the syntax for stuff function in an sql server?

722


what is normalization? Explain different levels of normalization? : Sql server database administration

893






What is temporary stored procedure?

702


What are different types of table joins?

745


What is the minimum and maximum number of partitions required for a measure group? : sql server analysis services, ssas

792


What are the differences between stored procedure and view in sql server?

833


What is self contained sub query?

747


What are the types of stored procedures in an sql server?

654


How do you run a trace?

686


Ways to improve the performance of a SQL Azure Database?

115


What are the different types of collation sensitivity?

746


What is table value parameters (tvp)?

760