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 are some of the pros and cons of not dropping the sql server builtinadministrators group? : sql server security
Other than truncate statement, which other command can by-pass the trigger on the tables?
What are Spatial data types in SQL Server 2008
What is report subscription?
Can you roll back the ddl statement in a trigger?
What is your recommendation for a query running very slow? : sql server database administration
How to connect a database with sql express.?
Why I have to use stored procedures?
What is report snapshot in ssrs?
If a user does not have permission to a table, but has permission to a view created on it, will he be able to view the data in table?
How do we upgrade from SQL Server 6.5 to 7.0 and 7.0 to 2000?
Define union, union all, minus, intersect?
What is function of ROLLUP ?
How to get the definition of a user defined function back?
How to connect to SQL Azure Database by using sqlcmd?