mysql - 无法使用该表上的条件调用更新表
问题描述
我尝试通过调用该表上的条件来更新我的表,并得到错误。
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));
解决方案
最后你有 2 个右括号删除 1 个括号
推荐阅读
- jquery - 我可以用 jQuery 填写 Django 表单吗?
- node.js - 如何使用 multer 获取 s3 存储桶上传的对象 url?
- json - npm 无法正确运行 react js
- python - Python 库请求返回“错误 503”,在 heroku 上打开链接
- swift - 为什么父 UIStackView 无法识别子 StackView 的高度?
- swift - swift 中不支持的授权类型错误是什么?
- c++ - 如何在非常量指针集合中搜索 const 指针?
- html - 居中 div 中垂直滚动条覆盖的内容的右边缘
- google-sheets - Google 表格 DGET() 找不到值
- git - 如何在 GitHub Actions 中获取提交更新的文件的文件名?