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

Is primary key clustered index?

688


Is sql dba a good career? : SQL DBA

712


Is it possible to remove child records without removing master table records...the two having pk,fk relationship?

1000


Could you please provide oca (oracle 10g) dumps for my certification ?

4782


What are sql injection vulnerabilities?

692






1) Synonyms 2) Co-related Subquery 3) Different Jobs in Plsql 4) Explain Plan 5) Wrap 6) Query Optimization Technique 7) Bulk Collect 8) Types of index 9) IF primary key is created then the index created ? 10) Foreign Key 11) Exception Handling 12) Difference Between Delete and Trunc 13) Procedure Overloading 14) Grant Revoke 15) Procedure Argument types. 16) Functions. 17) Joins

1326


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

737


What is a common use of group by in sql?

790


What is recursive stored procedure?

817


What is autocommit sql?

706


What are pl/sql cursors?

728


Can I copy :old and :new pseudo-records in/to an oracle stored procedure?

870


What is difference between mysql and postgresql?

705


What are the types of views in sql?

748


What are the types of join in sql?

712