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 / rajkumar v
select SNo, '(' + convert(varchar,count(SNo)) + ')' from
test group by SNo having COUNT(*)>=1
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
explain different types of joins? : Sql server database administration
How to create a simple table to test triggers in ms sql server?
how can a database be repaired? : Sql server administration
What number sorts of privileges are accessible in sql?
what are the different ways to return the rowcount of a table?
Explain iaas, paas and saas?
What is the purpose of linked server configuration in sql server?
Find nth lowest salary or get nth lowest salary?
When I delete any data from a table, does the sql server reduce the size of that table?
How to fetch the next row from a cursor with a "fetch" statement?
Can you index views?
What is check constraint in sql server?
How to create function without parameter in sql server?
What is difference between index and primary key?
What is update locks?