Joe,
Wednesday, May 29, 2002, 1:28:42 AM, you wrote:
JC> We have 3 tables: Users, List, and UsersList (a join table). How can I
JC> write a correct update statement to update the STATE field in the Users
JC> table for a certain List? For example, is the following UPDATE correct:
JC> Update Users
JC> Set Users.state='NY'
JC> where Users.id = UsersList.Usersid
JC> and List.id = UsersList.Listid
JC> and List.id= '339'
MySQL doesn't have multi-tables update yet. One solution
is described for DELETE statement in the manual:
http://www.mysql.com/doc/A/N/ANSI_diff_Sub-selects.html
JC> Thank you for your help.
JC> Joe
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [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