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 create a testing table in oracle?
What is Segment Advisor in Oracle?
How can windows applications connect to oracle servers?
What is a connect identifier?
How to login to the server without an instance?
How do you increase the OS limitation for open files (LINUX and/or Solaris)?
What is a sub query? Describe its types?
Explain a synonym?
Can we convert a date to char in oracle and if so, what would be the syntax?
How to check the server version in oracle?
How to fetch the row which has the max value for a column?
What is partitioned table in Oracle?
What is the difference between hot backup and cold backup in oracle? Tell about their benefits also.
What is the difference between translate and replace?
How to estimate disk space needed for an export job?