You can't  in a single SQL statement in MySQL:  MySQL does not allow updates
based upon joins.

Program around it using whatever language (perl, php, etc.) that you're
running the SQL statements from.

----- Original Message -----
From: "Vadim Kulikov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 31, 2002 10:00 PM
Subject: Update syntax


> Greetings:
>
> I'm trying to update a table T1 based on the condition which is a result
> of the key join table A and table B
>  the following command works with SYBASE but doesn't with MySQL:
>
>
> update A,B set A.field2='test' where A.field1=B.field1 and
> B.field5='test2'
>
>
>
>
> What's the correct syntax for it ? Or is there another way to accomplish
> that.
>
>
>  Thank you,
> Vadim Kulikov
> [EMAIL PROTECTED]
>
>  Thank you,
> Vadim Kulikov
>  818-428-1001
>
>
> ---------------------------------------------------------------------
> 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
>
>


---------------------------------------------------------------------
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