adspace


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 are the different types of subquery?

1233


How raid can influence database performance?

1116


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

1022


How to convert numeric expression data types using the cast() function?

1147


What is the primary use of the model database?

1147


What are different types of constraints?

1000


What is self contained sub query?

1139


What is normalization and what are the advantages of it?

1054


Does view occupy space?

1018


How to connect php with different port numbers?

1186


How can I check that whether automatic statistic update is enabled or not?

1111


How do I find query history in sql server?

1022


what is the difference between openrowset and openquery?

1193


Explain “row_number()” in sql server with an example?

1078


Can you index views?

953