how to delete all duplicate records from a table using
subquery?

Answer Posted / sunil

delete emp where empno not in(select distinct empno from emp);

For example we have duplicates in empno column then write
query like above...whatever column u want u can write..

Is This Answer Correct ?    0 Yes 11 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to define a specific record type?

838


How to calculate date and time differences in oracle?

768


How to add another datafile to a tablespace?

818


How to drop an index in oracle?

809


Difference between inner join vs where ?

793


How to Truncate Table in Oracle

892


normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi

1959


What are the uses of linked server and explain it in detail?

826


Calculate difference between 2 date / times in oracle sql?

801


What is where clause in oracle?

770


What is hash cluster in oracle?

831


What are the data types in oracle?

781


What happens to the current transaction if the session is killed?

758


How to convert characters to dates in oracle?

782


How to delete all rows a table in oracle?

815