SQL Question: referencing two tables in update statement

From: Stuart Chaulk <schaulk_at_hivnet.ubc.ca>
Date: 1997/08/28
Message-ID: <schaulk-2808971016020001_at_chrp.hivnet.ubc.ca>#1/1


[Quoted] Hi there,

[Quoted] Quick SQL guestion:

[Quoted] How do I reference two tables in an SQL statement. What I need is something like this, but not sure about the syntax:

update table_1 ref1, table_2, ref2
set ref1.field_1 = ref2.field_1
where ref1.field_2 = ref2.field2;

Any help would be VERY MUCH appreciated.

Thanks,

Stuart

-- 
Stuart Chaulk - Project Logistician
Community Health Resource Project
University of British Columbia | Centre for Excellence in HIV/AIDS
schaulk_at_hivnet.ubc.ca | http://cfeweb.hivnet.ubc.ca/chrp/
Received on Thu Aug 28 1997 - 00:00:00 CEST

Original text of this message