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
Which oracle applications pl/sql standard apis you are familiar, have you used most of them?
Can you differentiate between mediator and osb?
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
Tell me how to find the custom directory in front end?
what are the prerequisites for costing transactions?
what is the differences between internal requisition and internal sales order?
What is instead of trigger in where we will use?
Can we create tables in apps schema?
How to create a purchase order without a requisition?
Is soa a part of oracle fusion middleware?
What is count(*) from po_vendors(any table)?
What do you understand by soa?
List the types of flexfield?
How to move the one file from one instance to another instance? And your scripts also?
Suppose for report I have to parameters those are from_date and to_date, so to_date should be greater when compare to from_date, if we are giving to_date is lessthen it must shows some error how we will make?