employee table has employee id
-----------
empid
----------------
1
2
3
3
3
4
5
5
5
6
6
6
7
here the values r repeated two times.how to select the
repeated values only.i.e 3,5,6 should alone come.
Answer Posted / meher
If you want to get the count for the duplicates then, the
query will be:
SELECT EMPID,COUNT(EMPID) FROM EMPLOYEE GROUP BY EMPID
HAVING COUNT(EMPID)>1
| Is This Answer Correct ? | 4 Yes | 1 No |
Post New Answer View All Answers
Using the customer, and order table in northwind database, please write a query to produce xml?
When to use null data driven subscription?
How do you rebuild an identity column?
What is a full text index?
What are types of storage modes? : sql server analysis services, ssas
What is the difference between DATETIME2 and DATETIME?
What is a cursor, index in sql?
Can you use order by when defining a view?
What is sql service broker?
How can sql injection be stopped? : sql server security
What is Sqlpaging in SqlServer 2005 ?
What is thr feature of change data capture?
How to get a list of columns in a view using "sys.columns" in ms sql server?
What is RAID? What are the different types of RAID configurations?
Explain in brief how sql server enhances scalability of the database system?