how to find number of columns in a table in sql server 2000
and 2005 also
Answer Posted / dharmendra k. dixit
@Anshul..
Bro..through your code u can obtain the Total numbers of
rows in your Table.
---------------------------------
For getting Total Columns i will use this:
SELECT Count(*)As Coloumns
FROM Sys.SysColumns
Where ID =
(SELECT ID FROM Sys.SysObjects Where Name = 'YourTableName')
| Is This Answer Correct ? | 34 Yes | 8 No |
Post New Answer View All Answers
What is entity data services?
What do you mean by SQL injection attack?
What is the recursive stored procedure in sql server?
What is report snapshot?
What is recompile sql server?
What does man by sql wildcard characters in sql server?
How can sql server instances be hidden?
What are actions, how many types of actions are there, explain with example? : sql server analysis services, ssas
Give me a SQL Query to find out the second largest company?
How to add a new column to an existing table with "alter table ... Add" in ms sql server?
What is isnull() operator?
How to create a new schema in a database?
What are trace flags?
Can we perform backup restore operation on tempdb?
Is null in sql server?