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 database schema in oracle?
What happens if you set the sga too low in oracle?
How do we get field details of a table?
How to create a new oracle data file?
I creat Credit memo in AR. Now i want revers the Credit Memo.how you can revers that what out any aditional entry.
Explain an exception?
How to delete all rows a table in oracle?
State some uses of redo log files?
Point the difference between translate and replace?
What is connection pool in oracle?
Explain what are the advantages of views?
Explain alias?
What are the set operators union, union all, minus & intersect meant to do?
What happens if the imported table already exists?
How to write a query with a right outer join in oracle?