On Monday 10 March 2003 10:40, Hu Qinan wrote:

> Which records in tbl1 are to be updated are determined by an INNER JOIN
> with tbl2. I have tried the following:
>
> UPDATE tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id
> SET tbl1.col1 = 0;
>
> UPDATE tbl1, tbl2
> SET tbl1.col1 = 0
> WHERE tbl1.id = tbl2.id;
>
> UPDATE tbl1
> SET tbl1.col1 = 0
> INNER JOIN tbl2 ON tbl1.id = tbl2.id;
>
> But none of the above codes work. How to write this query?

Multi-table updates are supported only since 4.0.4




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Egor Egorov
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to