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

Answer Posted / lingareddy

by using below sub query delete duplicate all records:

DELETE FROM dept WHERE salary IN (
SELECT salary FROM dept GROUP BY salary HAVING ( COUNT(salary) > 1 ))


here is dept is the table name
salary is the column name

for any doubts about SQL contact with me

Thanks & Regards
Lingareddy.S

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to write numeric literals in oracle?

912


Can we use oracle pl/sql block in core java? if so how? pls get back to me .....

2739


Explain what are the different type of segments?

756


How can Oracle users be audited?

863


What is oracle database client?

780


Please explain compound trigger in oracle?

821


How to estimate disk space needed for an export job?

777


What is the difference between a user and a schema in oracle?

824


Explain how you would restore a database using RMAN to Point in Time?

1906


What is ceil and floor in oracle?

815


When system tablespace is created?

795


How to use group functions in the select clause using oracle?

829


We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.

5128


How to test null values?

856


Difference between the “verify” and “feedback” command?

1078