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
Difference between group by clause and having clause in SQL?
What are the different types of triggers in SQL SERVER?
Write a program using SQL queries to find a unique entry in a table.
What are the advantages of policy management?
What to check if a User database is locked?
How to get a list of columns in a view using the "sp_columns" stored procedure?
How will you know when statistics on a table are obsolete?
How to write a query with a full outer join in ms sql server?
when would you go for denormalization? : Sql server database administration
What do you understand by the analysis services in sql server?
What is the use of attributehierarchyvisible ? : sql server analysis services, ssas
What are partitioned views and distributed partitioned views?
What is table constraint?
What are the types of resultset?
What is shrink log file?