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
Does union all remove duplicates?
What are the different types of join?
What are different types of constraints?
What are the benefits of normalization?
What is the difference between join and inner join?
What is sub query and its properties?
Find nth lowest salary or get nth lowest salary?
Explain contrast amongst grouped and non-bunched records?
How will you hide an attribute? : sql server analysis services, ssas
How do triggers work?
What is blocking and how would you troubleshoot it? : sql server database administration
What are the ways available in sql server to execute sql statements?
what is the system function to get the current user's user id? : Sql server database administration
Distinguish between commit and rollback?
Does the order of columns in update statements matter?