Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: ideas to use ora hash
create table t1 (x int);
insert into t1select rownum from all_objects where rownum <= 10;
insert into t1 select * from t1; -- t1 now has "duplicate" rows:
1,1,2,2,3,3, ...
select * from t1 minus select 15 from dual; -- t1 minus a non-existent t1 value
Run this. You'll see that the minus on t1 (regardless of the set you're "subtracting") will remove duplicate rows from t1. That's what I meant by saying "be careful with minus". You might want this behavior, or you might not -- it's entirely up to you to decide what you consider "differences" between two tables (whether the existence of extra rows in one table qualifies as a difference).
Glenn
On 3/22/06, Juan Carlos Reyes Pacheco <juancarlosreyesp_at_gmail.com> wrote:
> Thanks Glen, but I didn't got the idea could you give an example :) please.
>
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Mar 22 2006 - 19:44:22 CST
![]() |
![]() |