How to retrieve Duplicate Rows only in a Table?
Suppose if a Table Name is "Education". It consists of
multiple columns. Then if we insert rows into this table
with duplicate records then how can we retrieve only
duplicate records from that table?
Answer Posted / smita
select a.empno, a.empname from education a,
(select empno, count(*) cnt from education group by empno
having count(*) > 1) b
where a.empno = b.empno
is the correct answer
| Is This Answer Correct ? | 12 Yes | 5 No |
Post New Answer View All Answers
Why do we use joins in sql?
What is the purpose of the primary key?
What is rowtype?
Enlist the advantages of sql.
What is difference between sql and excel?
What are triggers and its uses?
What are all the different types of indexes?
How do you sort in sql?
How many sql core licenses do I need?
How do I count records in sql?
Which normal form is best?
What is procedure and function?
What are instead of triggers?
How to start oracle sql developer?
Is sql an operating system?