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
Is nosql relational?
What is the difference between nvl function, ifnull function, and isnull function?
Why is partition used in sql?
What is the difference between sql and mysql?
what are the advantages and disadvantages of cascading style sheets? : Sql dba
What is a parameter query?
how to drop an existing view in mysql? : Sql dba
how to drop an existing index in mysql? : Sql dba
how do you tune the slow running queries in oracle db , explain the methodology
Can we perform dml on view?
What are the types of views in sql?
How we can update the view?
Does truncate remove indexes?
What are the types of sql commands?
What operating systems are supported by oracle sql developer?