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
Define full outer join?
How do I partition a table in sql server?
How to create a local temporary stored procedure?
What stored by the master? : sql server database administration
Explain what are the authentication modes in sql server?
What is bcp? When does it used?
What is serializable?
What command do we use to rename a db, a table and a column?
Can sql servers link to other servers like oracle?
What is the difference between truncate and delete commands?
What is difference between line feed ( ) and carriage return ( )?
What according to you is the difference between mysql and sql server performance?
What is a system database and what is a user database?
What is collation?
How many types of cursor type are there?