Write an SQL Query to
Delete Duplicate records from a table using ROWID.

Answer Posted / amit bhatnagar

Swati is cool. buth her queries are correct. you can either
take rowid >with subquery fetching minimum (rowid) else
Rowid < with subquery fething maximum (row id)

DELETE FROM <table_name> T1
WHERE T1.ROWID > (SELECT MIN(T2.ROWID)
FROM <table_name> T2
WHERE T2.<common column name> = T1.<common
column name>)

----------------------------

DELETE FROM <table_name> T1
WHERE T1.ROWID < (SELECT MAX(T2.ROWID)
FROM <table_name> T2
WHERE T2.<common column name> = T1.<common
column name>)
Good job Swati.. :)

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know what is applysys in oracle application database schema, what is apps?

978


Can you define an erp system?

905


please any one provide the oracle erp technical interview questions on modules(PO,AP,AR,INV,GL,OM)wise to my mail id..narendra_609@yahoo.co.in

3364


Tell me where we find the status of order information?

951


In support project one ticket alloted which steps follows manualy tell me ?

2464


What is sca and how is it useful?

878


What is a flexfield? List out its types.

923


what are the prerequisites for costing transactions?

2908


List of all the modules under Manufacturing, Finance and Distribution in oracle applications?

1992


What is count(*) from po_vendors(any table)?

857


Hi, Anybody please send me the Oracle APPS 1i technical interview questions (Real time) as wel as sample resume also?

2399


What are do's and dont's of Interface?

2151


Can u give the Documentation of Custom.pll in oracle apps

3258


what are the different transaction clauses in AR?

1852


What does appl_top directory contain?

881