最佳答案
有人能看出下面的查询有什么问题吗?
当我运行它时,我得到:
# 1064-您的 SQL 语法有错误; 请检查与您的 MySQL 服务器版本对应的手册以获得正确的语法 接近第8行的‘ a where a
Update Competition
Set Competition.NumberOfTeams =
(
SELECT count(*) as NumberOfTeams
FROM PicksPoints
where UserCompetitionID is not NULL
group by CompetitionID
) a
where a.CompetitionID = Competition.CompetitionID