On Monday 10 March 2003 10:40, Hu Qinan wrote:
> Which records in tbl1 are to be updated are determined by an INNER JOIN
> with tbl2. I have tried the following:
>
> UPDATE tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id
> SET tbl1.col1 = 0;
>
> UPDATE tbl1, tbl2
> SET tbl1.col1 = 0
> WHERE tbl1.id = tb
I use MySQL 3.23.
Dear all,
Which records in tbl1 are to be updated are determined by an INNER JOIN with tbl2. I
have tried the following:
UPDATE tbl1 INNER JOIN tbl2 ON tbl1.id = tbl2.id
SET tbl1.col1 = 0;
UPDATE tbl1, tbl2
SET tbl1.col1 = 0
WHERE tbl1.id = tbl2.id;
UPDATE tbl1
SET tbl1.col1 = 0
INNER JOIN tb
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 Us