Updating two tables in oracle
If both are specified, then the order of the clauses is not important.
merge_insert_clause To specify the values used for insert operations the merge_insert_clause is used.
An example of a constant filter predicate would be: A predicate such as the one shown is recognized by Oracle as a special case, and Oracle makes an unconditional insert of all source rows into the table.
Suppose I have table A and B and having four columns each table A(col1,col2,col3,col4) B(col1,col2,col3,col4) then how should i do something like this update A set(col2,col4)=(select B.col2, B.col4 from B where B.col1=A.col1 and A.col3=A.col3) Please help..........
MERGE is what is known as a deterministic statement.
That is, you can only update the same row of the target table once in the same MERGE statement.
Oracle performs the specified update if the condition of the ON clause is true.
As with any normal update, when the update clause is executed, all update triggers defined on the target table are fired.