Sorry its not possible.
Here a User Comment from the commented MySql Doc (Chapter UPDATE Systax)
--------------
Comments:
Michael Holopainen: I was looking for info on how-to UPDATE with data retrived from
another table. aka. UPDATE with JOIN.
I noticed many other people were asking the same question so I desided to write this
comment.
The answer is : "You can't".
Not until MySQL 4.1 that supports sub-selects.
Then and only then you can use something like this:
UPDATE t1 SET t1.col = (SELECT t2.col FROM t2 WHERE <where clause>) WHERE <where
clause>;
As far as I can tell not even in MySQL 4.1 can you use JOIN with UPDATE.
-----------------
Original Message:
-----------------
From: Sommai Fongnamthip [EMAIL PROTECTED]
Date: Fri, 15 Feb 2002 16:37:51 +0700
To: [EMAIL PROTECTED]
Subject: update data from other table
Hi,
How to update data in table with data from other table in single SQL
command (without using loop)?
Sommai,
----------------------------------------------------------
Please be informed that all e-mail which are addressing to
thaithanakit.co.th will need to be changed to
BTsecurities.com by March 1, 2002 Thank you. :-)
----------------------------------------------------------
---------------------------------------------------------------------
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
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.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