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

What are cursors stored procedures and triggers?

934


what's new in sql server 2016?

905


How do you trace the traffic hitting a sql server?

1069


What are click through reports?

138


Explain the cursor lock types?

981


What is the synonym of join?

895


Explain DBCC?

907


How to get the query of a table in sql server?

848


What is default port number for sql server 2000?

993


Insert syudents details in table.Current system date &time insert into joining time.How do insert?( in sysdate only return current system date how do add time?)

1800


What is sql server english query?

1036


What are user-defined functions (udfs) in sql server?

934


Can a cursor be updated? If yes, how you can protect which columns are updated?

1029


What is difference between equi join and inner join?

857


What is a file group?

1017