Hannu Krosing <[EMAIL PROTECTED]> writes:

> the more accurate (nonstandard) syntax could have been
> SELECT src.val,
>        tgt.val 
>   FROM updatesrc as src FOR UPDATE,
>        updatetgd as tgt
>  WHERE src.id = tgt.id
>    SET src.val = tgt.val
> ;

The syntax in Oracle, for example, would be not very different:

        SELECT src.id, src.val, tgt.val as newval
          FROM udpatesrc AS src, 
               updatetgd AS tgt
         WHERE src.id = tgt.id
   SET val = newval

This only works if src.id is declared as a primary key.

I'm not sure if this is blessed by any standard.
It's certainly extremely useful.


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly

Reply via email to