Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: delete duplicate records
hi
delete from temp a where a.rowid < (select max(rowid) from temp b where b.a1 = a.a1 and (b.a2 2 = 0 or b.a2 =1));
output of above delete is given below
A1 A2
---------- ----------
1 1 2 1 3 0 4 1
A1 A2
1 0
1 1
2 1
2 1
3 0
3 0
4 0
4 0
4 1
How to delete duplicate records from the above set .In duplicating records the a2 should be 1 others should be deleted
And if in duplication both a2 are 0 then one of them should exist
TIA Shibu
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: satish p INET: satish.pullela_at_wipro.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Fri Aug 23 2002 - 04:44:18 CDT
- text/plain attachment: Wipro_Disclaimer.txt
![]() |
![]() |