Home » SQL & PL/SQL » SQL & PL/SQL » Is there such thing as update all??
Is there such thing as update all?? [message #242195] Fri, 01 June 2007 00:31 Go to next message
beetel
Messages: 96
Registered: April 2007
Member
I know that we can insert into multiple tables using one insert statement. How about UPDATE? I have two tables with similar structures and have to be updated very similarly like:
Update table1
  set (col1, col2) = (select table1.x + val1,
                             table1.x + val2 from val_tab);

Update table2
  set (col1, col2) = (select table2.x + val1,
                             table2x + val2 from val_tab);

Is there such an 'UPDATE ALL' in 9i??
Re: Is there such thing as update all?? [message #242198 is a reply to message #242195] Fri, 01 June 2007 00:37 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
>I know that we can insert into multiple tables using one insert statement
Please demostrate with a reproducible example.
Re: Is there such thing as update all?? [message #242207 is a reply to message #242195] Fri, 01 June 2007 01:19 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can update only 1 table in an update statement.
The only exception is to update a view which has an "instead of" trigger but then this is the trigger that updates and with several update statements.

Regards
Michel
Previous Topic: Using sql type with cursor in plsql block
Next Topic: bulk collect & delete
Goto Forum:
  


Current Time: Thu Dec 08 08:15:59 CST 2016

Total time taken to generate the page: 0.04835 seconds