尝试此查询时:
UPDATE l1_a
SET l1_a.goals_for = l1_a.goals_for + l1_results.score1
FROM l1_results, l1_a
WHERE l1_results.team1 = l1_a.team_id;
我得到错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM l1_results, l1_a WHERE l1_results.team1 = l1_a.team_id' at line 3
l1_a 包含goals_for 和team_id
l1_results 包含 score1(这是多少个进球)和 team1(这是 team_id)
我的查询有问题吗?我已经仔细检查了所有列和表都是查询中的正确名称
谢谢