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
Explain system functions or built-in functions? What are different types of system functions?
How do I install only the client tools of sql server 2000?
What is the Difference Between Primary and Foreign Key?
What happens on checkpoint?
What is the maximum size of a row in sql server?
What are the dis_advantages of stored procedures, triggers, indexes?
Can one drop a column from a table?
What is the difference between a fill factor of 100 and 0?
What is sql collation?
It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio
What is use of attributehierarchyenabled? : sql server analysis services, ssas
tell me what are the steps you will take to improve performance of a poor performing query? : Sql server database administration
How to store and query spatial data?
What is the process of normalising?
Is it possible to have clustered index on separate drive from original table location?