Hi Reina,

Try like:

mysql >  UPDATE  maindb o,altdb ao set o.price =ao.price where o.id=ao.id;

This will do good.

Thanks
ViSolve DB Team
----- Original Message ----- From: "Richard Reina" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Wednesday, January 10, 2007 10:08 PM
Subject: Does Update allow for aliases?


I am trying to update from one table to another but I get a syntax error when I try:

UPDATE from maindb.orders o, altdb.orders ao SET o.price=ao.price WHERE o.ID=a.ID;

If update does not support aliases, is there another way to do this query? I am usin V3.23.54. Any help would be greatly appreciated.

Thanks,

Richard





Your beliefs become your thoughts. Your thoughts become your words. Your words become your actions. Your actions become your habits. Your habits become your values. Your values become your destiny. -- Mahatma Gandhi


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to