plsql - ORACLE Update with MINUS result -


in oracle 10g, want update records of resulting minus query below:

(  select a,b,c table1    minus   select a,b,c table2 ) 

the column updated not part of minus query not present in both tables below code not option

update (  select a,b,c table1    minus   select a,b,c table2 ) set table1.d = 'test' 

how about:

update table1    set d = 'test'  (a,b,c) not in(select a,b,c table2); 

edit: performance of minus suck, due sort operation. if of {a,b,c} nullable, try following instead:

update table1 t1    set t1.d = 'test'  not exists(          select 'x'            table2 t2           t2.a = t1.a             , t2.b = t1.b             , t2.c = t1.c        ); 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -