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 / naresh

select * from emp where sal in(select sal from emp group by
sal having count(sal)>1);

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How global cursor can be declare with dynamic trigger ?

1750


What do you mean by table in sql?

526


what are integrity rules?

570


Is natural join and inner join same?

500


Which type of cursor is used to execute the dml statement?

534






What is a natural join?

518


What is pl sql script?

564


How many joins can you have in sql?

523


Explain about various levels of constraint.

525


Is it possible to create the following trigger: before or after update trigger for each row?

722


what is foreign key? : Sql dba

589


Can %notfound return null after a fetch?

593


how to rename an existing column in a table? : Sql dba

514


Explain the working of primary key?

612


Which one is better sql or oracle?

503