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 / vikas kant
select key,count(key1) from [table_name]
group by key
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
How to update multiple rows with one update statement in ms sql server?
Can a unique index be created on a column, which contains null?
what kind of lan types do you know? : Sql server database administration
What is multi-statement table-value user-defined function?
What is sql injection and why is it a problem? : sql server security
Explain the properties of sub-query in sql server?
How to rebuild all indexes on a single table?
What is dynamic cursor in SQL SERVER?
Explain isolation levels that sql server supports?
How will you optimize a stored procedure optimization?
Explain index in sql server?
What is the use of floor function in sql server?
What is the difference between grant and with grant while giving permissions to the user?
Write the syntax for stuff function in an sql server?
What is a partitioned view?