SQl,UPDATE INNER JOIN 您的 SQL 语法有误
SQl,UPDATE INNER JOIN You have an error in your SQL syntax
UPDATE A set A.amount = A.amount
FROM product_in_stock AS A
INNER JOIN move_str_start AS B ON A.id_model = B.id_model
WHERE B.id_move=121 AND A.id_stock=7;
我有错误:
You have an error in your SQL syntax; check the manual that
corresponds to your MariaDB server version for the right syntax to use
near 'FROM product_in_stock AS A INNER JOIN move_str_start AS B ON
A.id_model = B.id_m' at line 1
update product_in_stock AS A
INNER JOIN move_str_start AS B ON A.id_model = B.id_model
SET A.amount=A.amount+B.count
WHERE B.id_move=121 AND A.id_stock=7;
PS 这是答案
UPDATE A set A.amount = A.amount
FROM product_in_stock AS A
INNER JOIN move_str_start AS B ON A.id_model = B.id_model
WHERE B.id_move=121 AND A.id_stock=7;
我有错误:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM product_in_stock AS A INNER JOIN move_str_start AS B ON A.id_model = B.id_m' at line 1
update product_in_stock AS A
INNER JOIN move_str_start AS B ON A.id_model = B.id_model
SET A.amount=A.amount+B.count
WHERE B.id_move=121 AND A.id_stock=7;
PS 这是答案