write a query to delete similar records in different tables
with same structure

Answer Posted / senthil

This done by Co-related sub-query:- based upon ROWID
uniqness this deletes the duplicate rows.

Delete from emp x where ROWID != (Select MIN(ROWID) from
emp y where y.empno = x.empno);

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to create a new table in mysql? : Sql dba

544


How do I quit sql?

489


Mention what is the plv (pl/vision) package offers?

634


Why join is faster than subquery?

595


How do I create a sql script?

534






define data blocks ? : Sql dba

542


What are different types of queries in sql?

517


Is a table valued function object?

573


What is gpt format?

498


What is difference between pls_integer and integer?

514


what's the difference between a primary key and a unique key? : Sql dba

504


What are different clauses used in sql?

580


what is the command used to fetch first 5 characters of the string? : Sql dba

1130


how to convert dates to character strings? : Sql dba

531


How to use transactions efficiently : transact sql

538