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 / krishna reddy l
select convert(varchar(5),ex)+'('+convert(varchar(5),count
(ex))+')' from example group by ex
Table name example and columna name ex
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is resultset concur_updatable?
What is user defined datatypes and when you should go for them?
What are the advantages to use stored procedures?
Can you please differentiate between a primary key and a unique key?
How to select some specific rows from a table in ms sql server?
Where are sql server usernames and passwords stored in the sql server?
How many databases instances are there in sql server 2000?
How raid can influence database performance?
Define self join in sql server joins?
what is the difference between openrowset and openquery?
What are the differences between stored procedure and view in sql server?
How to create new tables with "select ... Into" statements in ms sql server?
When we should use @@error?
Write a query to include a constraint, to check whether the employee salary is greater than 5000?
Can a function call a stored procedure in sql server?