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 tbl2 ON tbl1.id = tbl2.id; But none of the above codes work. How to write this query?