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 the name of reporting services config file and what’s it’s used for?
What is a field name?
What is the difference between clustered and a non-clustered index?
How to stop a loop early with break statements in ms sql server?
How to use order by with union operators in ms sql server?
Why use view instead of a table?
Explain Normalization and DE normalization
what is an extended stored procedure? : Sql server database administration
What are the different types of stored procedures?
What is the difference between stored procedure and user defined functions?
Explain what are various ways to enhance the ssrs report?
What is scan table/view and seek table/view when its occurs? : sql server database administration
What the difference between UNION and UNIONALL?
What are the filtered indexes?
What does the on delete cascade option do?