Wednesday, June 15, 2011

Query to get the total no of columns in a given table in ms sql server database

In this programming tutorial you will learn the query to get the total no of columns in a given table in ms sql server database. Its quite easy in ms sql server. Lets have a look over the query given below

Select Count(*) As ColumnCount
From   Information_Schema.Columns
Where Table_Name = 'mytbl_name' 

0 comments:

Post a Comment