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
How to initialize variables with default values?
How to define a specific record type?
 How to use an oracle sequence generator in a mapping?
What is a server parameter file in oracle?
How to calculate date and time differences in oracle?
How to create a stored program unit?
Who developed oracle & when?
What is the quickest way to fetch the data from a table?
Why packages are used in oracle?
How to drop an existing view in oracle?
How to create an oracle testing table?
What is partitioned table in Oracle?
Select all the employees who were hired in last 2 years and who works in dept where max managers are working.
What is meant by joins?
Explain a private synonyms?