当前位置:网站首页>SQL: SELECT t.`app_code`, SUM(t.`success_num`) AS success_num, SUM(t.`
SQL: SELECT t.`app_code`, SUM(t.`success_num`) AS success_num, SUM(t.`
2022-07-20 20:20:00 【YOUNG.K】
SQL: SELECT t.`app_code`, SUM(t.`success_num`) AS success_num, SUM(t.`failure_num`) AS failure_num, SUM(t.`success_total_time`) AS success_toatl_time FROM ds_api_call_total t WHERE t.'app_code' = ? GROUP BY t.`app_code
### Cause: java.sql.SQLSyntaxErrorException: 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 ''app_code' = 'yzt_slt'
GROUP BY t.`app_code' at line 6
这个错误的原因是因为我直接将sqlyog 查询的语句直接复制到了mybatis文件中(为啥用sqlyog呢,是因为公司内部的安全助手不让用NaviCat,就离谱)
所以报错信息显示:t.`app_code`, SUM(t.`success_num`) AS success_num, SUM(t.`。。。。
也是带单引号的
解决方法:把单引号删去即可。
这样就没问题了。这个报错算是一个不太常见的,但又必备的小贴士。
如果本篇文章对你有帮助,还请一键三连【开心】
边栏推荐
- 基于SSM框架+MySQL的超市订单管理系统【源码+文档+PPT】
- Supermarket order management system based on SSM framework +mysql [source code + document +ppt]
- Scientific research | how should research achievements be signed?
- 效率低?响应慢?报表工具痛点及其解决方案
- Inefficient? Slow response? Pain points of reporting tools and their solutions
- 【LeetCode】二分查找题解汇总
- 剑指 Offer 13. 机器人的运动范围
- node的模块化
- Rt-thread-2022 summer camp - learning summary - day 3 (thread synchronization)
- 读书笔记(一)——《追风筝的人》
猜你喜欢
Full stack development practice | complete tutorial of SSM framework integration
Type personnalisé: structure (1)
怎么进行用户留存分析?
【LeetCode】在非有序数组中使用二分
效率低?响应慢?报表工具痛点及其解决方案
NPM and package
Inefficient? Slow response? Pain points of reporting tools and their solutions
有些测试,还真不是你够努力就能测出来的
【TensorFlow&PyTorch】创建张量学习笔记
剑指 Offer 12. 矩阵中的路径
随机推荐
剑指 Offer 34. 二叉树中和为某一值的路径
[wrong question] diagonal
受众分析与卸载分析全面升级,HMS Core分析服务6.6.0版本上新
Win64 驱动内核编程-31.枚举与删除映像回调
互联网行业的中年危机是35岁这分水岭
剑指 Offer 58 - I. 翻转单词顺序,strip()函数
幼儿园学费比较
【OpenCV 例程200篇】235. 特征提取之主成分分析(sklearn)
Kwai's overseas product snackvideo cooperates exclusively with pubg mobile to help mobile travel break the circle overseas
Source code installation PostgreSQL 13.1
【LeetCode】在非有序数组中使用二分
conda升级tensorflow-gpu=2.5.0及cudn,cudatoolkit版本
Rt-thread-2022 summer camp - learning summary - day 3 (thread synchronization)
High score technical document sharing of ink Sky Wheel - Database Security (48 in total)
Reading club | get rid of the fog of psychological counseling: how should ordinary people treat psychological counseling
高等数学(第七版)同济大学 习题3-2 个人解答
QT OpenGL ambient lighting
科研 | 研究成果该如何署名?
Simple opengauss SQL tuning using plan hint
Huawei cloud: serve everything, build a whole scene of smart Finance