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 / lakshmi narayana
select * from emp a ,
(select empno,count(*) from emp group by empno having count
(*) > 1) b
where a.empno = b.empno
| Is This Answer Correct ? | 27 Yes | 10 No |
Post New Answer View All Answers
What is the difference between unique and primary key constraints?
What are the limitations of sql express?
What is latest version of sql?
what are the differences between procedure-oriented languages and object-oriented languages? : Sql dba
What is type and rowtype in pl sql?
How would you reference column values before and after you have inserted and deleted triggers?
Can a foreign key be a duplicate?
why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba
Why cannot I use bind variables in ddl/scl statements in dynamic sql?
what is an extent ? : Sql dba
What are the two different parts of the pl/sql packages?
what are all the different normalizations? : Sql dba
Does pl sql work in mysql?
How do I view output in sql developer?
What are triggers in sql?