how to find number of columns in a table in sql server 2000
and 2005 also
Answer Posted / kishore
select count(*) NoOfColumns from SYSCOLUMNS
WHERE id= (Select id from SYSOBJECTS where name = 'city')
In this querry may name is Tablename
Is This Answer Correct ? | 58 Yes | 23 No |
Post New Answer View All Answers
What are the limitations/drawbacks or ssrs 2008 r2?
What is the purpose of grouping data in a report?
How to delete duplicate rows in sql server?
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you
Which are new data types introduced in sql server 2008?
Can we shrink data file in sql server?
What is difference between equi join and natural join?
what are the three command line utilities and what are their primary functions?
Explain index in sql server?
What is difference between rownum and row_number?
How can we use ConnectorJ JDBC Driver with MS SQL?
What is the syntax to execute the sys.dm_db_missing_index_details? : sql server database administration
What is a primary index?
what is the difference between openrowset and openquery?