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
How to list all login names on the ms sql server?
What is a raid and what are different types of raid configurations?
What happens if null values are involved in boolean operations?
What are the differences between ms sql server & oracle?
Tell me about joins in database system and explain each in detail.
How to configure odbc dsn with different port numbers?
What is the purpose of indexing?
What is the fillfactor concept in indexes?
Explain about remote stored procedure?
What is primary key and example?
What is primary key index?
What is the difference between insensitive and scroll cursor?
What are the new scripting capabilities of ssms? : sql server management studio
How to locate and take substrings with charindex() and substring() functions?
What is the difference between rank and dense_rank?