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 is cursors?

1191


What are translations and its use? : sql server analysis services, ssas

1043


Tell me about the approaches which you used to counter the DI problems.

1356


How do I create a trace in sql server?

1048


Explain about the command-line tool SQLCMD?

1093


Explain something about security and SQL Azure?

134


Explain intellisense for query editing

1032


How to create a new schema in a database?

1152


What is transaction server implicit?

1015


What is tablix?

163


What does nvl stand for?

946


What is sqlservr.exe - process - sql server (sqlex?press)?

1114


What are the different types of triggers in SQL SERVER?

1139


what are different types of backups available in sql server? : Sql server database administration

941


how many clustered indexes can be created on a table? : Sql server database administration

1156