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
Please explain drop constraint oracle?
What is integrity and what is constraint??Explain with example
What is a cursor and what are the steps need to be taken?
What is a trace file and how is it created in oracle?
Please explain compound trigger in oracle?
What is memory advisor in Oracle?
What view(s) do you use to associate a users SQLPLUS session with his o/s process?
How can I create database in oracle?
Give the advantages and disadvantages of clusters.
can u send the sql dumps to sivakumarr1987@gmail.com plz help me
Whats the benefit of dbms_stats over analyze?
What is ceil and floor in oracle?
How do I call oracle stored procedures that take no parameters?
How to use values from other tables in update statements using oracle?
WHEN CURSOR MOVES FROM ONE FORM TO ANOTHER FORM, HOW MANY TRIGGER WILL BE FIRED AND WHAT ARE THEIR SEQUENCE?