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 many replicas are maintained for each SQL Azure database?
What are the commands used in DCL?
What are 3 ways to get a count of the number of records in a table?
What are the steps to follow to configure SQL*Net?
What is the difference between index seek vs. Index scan?
How to use “drop” keyword in sql server and give an example?
Explain about unique identifier data type in sql server?
State a few properties of relational databases?
What is user-defined multi-statement table-valued function?
Which event (check constraints, foreign key, rule, trigger, primary key check) will be performed last for an integrity check?
Define left outer join in sql server joins?
What is implicit mode in sql server?
Is ssrs support other database except ms sql server?
what happens on checkpoint? : Sql server database administration
What are information schema views?