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...

if we have a column (Key) in a table.
and values of that column is
Key
1
1
1
2
2
3
3
4
4
5
5
5
and we want to show the data after query..like..

1(3)
2(3)
3(2)
4(2)
5(3)
how many times a single term comes..

Answer Posted / rakesh prasad

In Sql server 2005

select col + '('+ cast (count(col)as varchar(1000))+')'from
tablename group by col

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define full outer join?

1012


How do I partition a table in sql server?

1099


How to create a local temporary stored procedure?

1047


What stored by the master? : sql server database administration

1184


Explain what are the authentication modes in sql server?

1073


What is bcp? When does it used?

1044


What is serializable?

1090


What command do we use to rename a db, a table and a column?

983


Can sql servers link to other servers like oracle?

896


What is the difference between truncate and delete commands?

1110


What is difference between line feed ( ) and carriage return ( )?

951


What according to you is the difference between mysql and sql server performance?

1146


What is a system database and what is a user database?

1140


What is collation?

1195


How many types of cursor type are there?

1169