Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: delete duplicate records
Thanks a lot sathish ………….
-----Original Message-----
Sent: Friday, August 23, 2002 3:14 PM
To: Multiple recipients of list ORACLE-L
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: M B Shibu
INET: basher.shibu_at_acusis.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 - 05:08:19 CDT