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
what is pay run id ?
testing tools?
What do you understand by a set of books?
What are the different components you should consider while defining a responsibility in oracle apps?
what is the differences between internal requisition and internal sales order?
what is the difference between request group and request security in oracle apps?
what are the prerequisites for costing transactions?
Tell me where we find the status of order information?
What are file in oracle.
What is sca and how is it useful?
What do you understand by concurrent programs?
Tell me how to find the custom directory in front end?
How do you register report in oracle apps?
Explain what are the tables of auto invoice?
how can develope the po variance and po summary report? with tables mandatory columns and query please?