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
What is a Garbage Collection? and what is full recursive Garbage collection?
What is the relation of a user account and a schema in oracle?
What is a cursor in oracle?
What is program global area (pga) in oracle?
Why does oracle 9i treat an empty string as null?
What is oracle host variable?
What is data block in Oracle?
How we can able to import our own template (users designed MS-Word templates) which has many tabular columns; need to pass some values generate by Oracle-reports9i? Actually need to import more than 400 MS-Word templates into Oracle Reports-9i to minimize layout design in Reports.
Why does for update in oracle 8 cause an ora-01002 error?
What are temporal data types in oracle?
What is the usage of merge statement?
How to omit columns with default values in insert statement in oracle?
How to commit the current transaction in oracle?
What is bulk collect in oracle?
Can I create users through internet explorer in oracle 10g?