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 / saravanan p
Select cast(idKey as varchar)+'('+cast(count(idKey) as
varchar)+')'
from #tbl1 group by idKey
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
can a database be shrunk to 0 bytes, if not, why? : Sql server administration
What is user defined stored procedures?
Which are the olap features?
Explain different types of index?
How to turn off warning messages during php execution?
How can you check the level of fragmentation on a table?
How to create a ddl trigger using "create trigger" statements?
Can a table have 2 primary keys?
What is normalization? What number of normalization shapes are there?
List some of the rules that apply to creating and using a ‘view’
What were the latest updates to SQL Azure service?
Explain Capacity planning to create a database? and how to monitor it?
How can we delete a table in sql server?
What are the grouping functions?
What is row-level compre?