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 limitations in ssrs on sql server express edition?

195


What is resultset concur_updatable?

1054


What is difference between order by and group by?

1054


What are the different types of backups that exist?

1224


Can we call future method from queueable?

1097


What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?

4459


Does index slows down insert statements?

1047


What is the difference between dbcc indexdefrag and dbcc reindex?

1040


What the different components in replication and what is their use?

998


What factors you will consider calculating the storage requirement for that view?

993


What sql server means?

1007


What are scalar functions?

1051


Is it possible to update the views? If yes, how, if not, why?

1086


How you trouble shoot when any job fails

1984


What is the optimization being performed in oracle and SQL Server?

1098