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 read write transaction in oracle?
How to define an oracle sub procedure?
How to convert a string to a date in oracle database?
How to write numeric literals in oracle?
What is a database table in oracle?
State any two functions of oracle?
How would you edit your CRONTAB to schedule the running of /test/test.sh to run every other day at 2PM?
how to make an oracle object
HI ALL, CAN ANYONE TELL ME THE DIFFERENCES BETWEEN SQL CLUSTURS,MSQL CLUSTERS,ORACLE CLUSTERS.......THANKS IN ADVANCE
Is oracle a language?
Explain temporal data types in oracle
How to run the anonymous block again?
How to use "out" parameter properly?
What are the arithmetic operations?
How to count duplicated values in a column in oracle?