The proper syntax would need to be: UPDATE maindb.orders o, altdb.orders ao SET o.price=ao.price WHERE o.ID=a.ID;
The only problem is the existence of the "from". That being said, an UPDATE ... JOIN likely doesn't work under MySQL 3 -----Original Message----- From: Chris White [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 10, 2007 12:10 PM To: Richard Reina Cc: mysql@lists.mysql.com Subject: Re: Does Update allow for aliases? Richard Reina wrote: > 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; > First off, it'd be best if possible (I know some cases prevent it) to upgrade your server. The latest stable is 5 and you're on 3, so a lot of people aren't going to be able to vouch that much for any sort of issues regarding it. Also, UPDATE FROM seems to be a non standard SQL extension, and I haven't been able to find anything on MySQL supporting it (Only MsSQL). Feel free to prove me wrong though (in fact I'd love to be proven wrong so I know I'm not going completely crazy ;) ). -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]