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
What is difference between inner join and cross join?
Are stored procedures compiled?
Is postgresql a server?
Is a secondary key the same as a foreign key?
How to run pl sql program in mysql?
What is substitution variable in pl sql?
What is where clause in sql?
What is sql*loader?
How to read xml file in oracle pl sql?
What is sql deadlock?
what is view? : Sql dba
Explain the rollback statement?
Can we use rowid as primary key?
what is error ora-03113: end-of-file on communication channel?
What is sql comments?