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


Please Help Members By Posting Answers For Below Questions

What is difference between inner join and cross join?

522


Are stored procedures compiled?

525


Is postgresql a server?

577


Is a secondary key the same as a foreign key?

492


How to run pl sql program in mysql?

512






What is substitution variable in pl sql?

505


What is where clause in sql?

535


What is sql*loader?

576


How to read xml file in oracle pl sql?

509


What is sql deadlock?

565


what is view? : Sql dba

558


Explain the rollback statement?

576


Can we use rowid as primary key?

546


what is error ora-03113: end-of-file on communication channel?

605


What is sql comments?

650