write a query to delete similar records in same table

Answer Posted / bcaramu

delete from employee
where (empid, empssn)
not in
( select min(empid), empssn
from employee group by empssn);

Is This Answer Correct ?    8 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to know the last executed procedure?

563


explain mysql aggregate functions. : Sql dba

528


What are dml commands?

502


What is a natural join?

490


Is record in oracle pl sql?

507






how to drop an existing index in mysql? : Sql dba

517


explain the difference between myisam static and myisam dynamic. : Sql dba

497


What is acid property in a database?

562


Do prepared statements prevent sql injection?

497


Which table is left in left join?

499


What does count (*) mean?

498


What are all the common sql functions?

536


Does sql*plus also have a pl/sql engine?

537


How do I count duplicates in sql?

521


What is a common use of group by in sql?

563