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

How to list all login names on the ms sql server?

1142


What is a raid and what are different types of raid configurations?

1267


What happens if null values are involved in boolean operations?

987


What are the differences between ms sql server & oracle?

1061


Tell me about joins in database system and explain each in detail.

1047


How to configure odbc dsn with different port numbers?

1088


What is the purpose of indexing?

1045


What is the fillfactor concept in indexes?

985


Explain about remote stored procedure?

1008


What is primary key and example?

954


What is primary key index?

979


What is the difference between insensitive and scroll cursor?

1160


What are the new scripting capabilities of ssms? : sql server management studio

1067


How to locate and take substrings with charindex() and substring() functions?

1016


What is the difference between rank and dense_rank?

1089