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 do you tell what your machine name is and what is its IP address?
ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process
IS it possible to built the oracle database without setting the kernal parameters?
What is a table index in oracle?
How to pass parameters to procedures in oracle?
What is the string concatenation operator in oracle?
What is translate in oracle?
what is meant by magic query
Explain the truncate in oracle?
A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.
Differentiate between translate and replace?
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.
What are the types of trigger in oracle?
How to calculate date and time differences in oracle?