Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how to find number of columns in a table in sql server 2000
and 2005 also

Answer Posted / harshad

select count(*) from information.schema.columns
where table_name='tablename'

//where tablename is name of your sql table.
//do not prefix table name with .dbo

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of sql server?

1010


What are the different types of sub-queries?

1012


Why should you use or avoid select * statements?

984


Explain what role entity and relationship play in an ER diagram.

1034


How do users use Report Builder with SQL Server data sources?

152


How do you delete a data source?

965


What is difference between delete and truncate commands?

1027


How to make conditional sum in ssrs?

177


List down some advantages of sql stored procedure?

919


Explain SSRS Architecture?

189


What is user defined datatypes and when you should go for them?

980


What are the advantages of the mirroring?

1032


Explain few examples of RDBMS?

995


1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?

2059


Why do we use stored procedures in sql server?

909