dbTalk Databases Forums  

update table a from table b

comp.databases.oracle comp.databases.oracle


Discuss update table a from table b in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
michael newport
 
Posts: n/a

Default update table a from table b - 07-01-2004 , 04:20 AM






in Ingres I can do this

update table1 from table2
set table1.field = table2.field
where table1.id = table2.id

is there an equivalent in Oracle ?

Regards
Michael Newport

Reply With Quote
  #2  
Old   
Wit Serdakovskij
 
Posts: n/a

Default Re: update table a from table b - 07-01-2004 , 04:32 AM






Hello, michael,

About 02:20 01-Jul from michaelnewport (AT) yahoo (DOT) com accepted:

Quote:
in Ingres I can do this

update table1 from table2
set table1.field = table2.field
where table1.id = table2.id

is there an equivalent in Oracle ?
update table1
set field = (
select field
from table2
where table2.id = table1.id
);

--
wbr,
Wit.


Reply With Quote
  #3  
Old   
michael newport
 
Posts: n/a

Default Re: update table a from table b - 07-12-2004 , 01:07 AM



Hi Wit,

did I say thankyou ?

Thankyou.

been rather busy with work !

regards
Mike

a simple report is now an overnight pl/sql batch th

Reply With Quote
  #4  
Old   
michael newport
 
Posts: n/a

Default Re: update table a from table b - 07-12-2004 , 01:07 AM



Hi Wit,

did I say thankyou ?

Thankyou.

been rather busy with work !

regards
Mike

a simple report is now an overnight pl/sql batch th

Reply With Quote
  #5  
Old   
michael newport
 
Posts: n/a

Default Re: update table a from table b - 07-12-2004 , 01:07 AM



Hi Wit,

did I say thankyou ?

Thankyou.

been rather busy with work !

regards
Mike

a simple report is now an overnight pl/sql batch th

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.