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
What is sharding?
What are the 3 types of schema?
What are filegroups in sql server?
Differentiate between ms sql server reporting services vs crystal reports?
What are triggers in ms sql server?
What is the difference between dbcc indexdefrag and dbcc reindex?
What does normalization do to data?
What is the distinction amongst delete and truncate?
What are the extra roles available in msdb? : sql server security
What are the five major components of a dbms?
What is the dbcc command and why is it used?
Explain Reporting Life Cycle?
Difference between DELETE and TRUNCATE?
What is the log shipping?
do views contain data ?