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

Answer Posted / bharath

1.SELECT ROWID FROM TABLE T1
WHERE ROWID NOT IN (SELECT MIN(ROWID)
FROM TABLE T2 WHERE T1.KEY=T2.KEY);

THIS QUERY IS USEFUL WHEN WE HAVE A KEY VAL.
2.
i.CREATE TABLE NEW AS SELECT DISTINCT * FROM OLD;
ii.DROP TABLE OLD;
iii.RENAME NEW TO ORIGINAL;
THIS IS WHEN WE APPLY TO DELETE DUPLICATE ROWS..

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you register report in oracle apps?

635


How to move the one file from one instance to another instance? And your scripts also?

617


In hierarchical structure of a database? we have write query from where we should start?

1708


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

1805


Which oracle applications pl/sql standard apis you are familiar, have you used most of them?

639






1. when we r doing interface/conversion which things u will take care to improve the perfrmonce?(except bulk collect) 2. In conversion,u r loading the data using sql*loader,I dnt want to use sql*loader,& i have millions of records,Id der any way to load the data withing fraction of time considering best performance. 3. When u r doing conversion,taht using sql*loader u r loading data into staging table,u r writing control file bt I dnt want to use sql*loader,when u r creating con prog that time can we pass all values from flat file using paramere,valuset?how? 4. In flat file u got 50 records,out of 50 ,30 records are proceesed & inserted into base table,after taht clien understood that 1 item having wrong name e.g insted of ABC he given DCE, so can we delete?hw?(client permission is der) i have lot of wrong item name randomly spreaded,can we delete it?hw? 5.after doing validation hw u will follow approach to error out records?if i want to send all the error out records to client daily,whats ur approach? 6. In outbound interface is der any way to load the data(large data-millions of records) except UTL_FILE package? 7. what is parsing? 8. In technical doc.s which section will mention?except code? 9. Do u have any idea about code depository tool? 10.whats is performance tunning,DB link? 11, How u will do RMA?

13627


What are the different components you should consider while defining a responsibility in oracle apps?

648


please send me forms, xml pulisher questions,answers

1658


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

648


Tell me where we find the status of order information?

669


What do you understand by soa?

696


If we have a repeated record in a table. But the repeated record how i can transfer from table to nested table?

1657


what is global tempory table?

6313


How can you achieve loose coupling in soa framework?

726


pls send me out bound code of supplers,site,bankiformation code pls as soon as

1762