首页 > 解决方案 > 无法使用该表上的条件调用更新表

问题描述

我尝试通过调用该表上的条件来更新我的表,并得到错误。

update grade G
set G.`score` = G.`score` + 5
where G.`snum` IN (select G1.`snum` from grade G1 where G1.`cname` ='Database Systems' And G1.`score` <> 'NULL' AND G1.`score` <= 95));

我不知道为什么它会给我语法错误,因为下面这行给了我 2 个满足条件的 snum。

where G.`snum` IN (select G1.`snum` from grade G1 where G1.`cname` ='Database Systems' And G1.`score` <> 'NULL' AND G1.`score` <= 95));

标签: mysql

解决方案


最后你有 2 个右括号删除 1 个括号


推荐阅读