About Oracle Update multiple table problems
There are several ways to achieve this:
One is:
Update table1
Set (field1,field2 ...) =
(Select field1,field2 .....)
From table2
where Table1.field1=table2.field1)
where Table1.field1 in (select Field1 from table2)
Two kinds are:
Create a primary key primary key or union key for the table1,table2 associated field
Update (Select table1.field1,table1.field2,table2.field1,table2.field2
From Table1,table2
where Table1.field1=table2.field1)
Set Table1.table2=table2.table2,
Table1.fieldn=table2.tablen,
......
Table1 's Field1 and table2 Field1 will need to establish a primary key or a unique index.
Three kinds are:
Merge into Table1
Using table2
On (Table1.field1=table2.field1 and ...)
When matched then Update set Table1.field2=table2.field2,
TABLE1.FIELDN=TABLE2.FIELDN,
......
When isn't matched then [doing other thing]
The remaining methods can use cursors