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

Answer Posted / swati

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>)

Is This Answer Correct ?    19 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you register report in oracle apps?

618


Pls tel me the best text book for Oracle Apps 11i Tech? & I want D2K Text book also?

1679


how can i print random rows in plsql table

1925


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

2987


Explain what are the tables of auto invoice?

638






what are the different transaction clauses in AR?

1597


Hi any one plz help me .i need 2 or 3 customized and 2 or 3 development reports on PO module..if any body having plz send me with one by one step ,i mean where u do the customization and wht are the steps u follwed when u do the customization,wht are fields u added or deleted ,How u added or these fields as per clinet requirement and wht are errors u faced .plz send it to my mail id iamvenki@gmail.com

1884


What is oracle soa suite and what are its different components?

639


What do you understand by concurrent programs?

613


How can we import the data into a database using sql * loader?

673


What are the Standard Reports and Forms in HRMS?

1764


What is sca and how is it useful?

649


How to create a purchase order without a requisition?

615


tell me the scenarios of the independent in reports

2037


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

3068