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 / javamaster
select key,count(key) from tablename
group by key order by key
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Does index speed up select statements?
How to call a function from a stored procedure in SQL Server ?
Why we need sql server?
Explain syntax for dropping triggers?
While using a cursor, how can you differentiate between a deleted row and a row that has been inserted with null data values?
How to Check if table exists in sql server?
Can we use having clause without group by?
What is trace flag in sql server?
What is a heap?
Determine when an index is appropriate?
How to list all columns in a table using odbc_columns()?
What is a mixed extent?
Why do we backup Active Directory ?
Explain primary key?
How to create prepared statements using odbc_prepare()?