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 get maxsal , minsal, ename department wise in single query
How to drop a stored procedure in oracle?
What is user managed backup in Oracle?
What is the dynamic sql in oracle?
How to use subqueries in the from clause in oracle?
Difference between pre-select and pre-query
What is a nvl function?
How can you tell how much space is left on a given file system and how much space each of the file systems subdirectories take-up?
How can we force the database to use the user specified rollback segment?
What is data block in Oracle?
Explain a private synonyms?
How does propagation differ between Advanced Replication and Snapshot Replication (read-only)?
How do I learn what codesets are available in oracle?
How do I find the database name in oracle?
How to divide query output into groups in oracle?