
第一条语句会报错:
错误码: 1064
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 't where t.deveui = ''' at line 1
第二条语句则可以,原来是mysql数据库delete数据时,不支持表别名。
https://blog.youkuaiyun.com/huangxingchen123/article/details/52608408
-------------------------------------------------------------------------------------------------------------------
第二次遇到了,同事写的接口,一测就出现问题:
### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'a where 1=1
AND a.trainingid = 't9050459876951860405T2

在尝试使用表别名进行MySQL数据删除操作时,可能会遇到1064错误,提示语法错误。实际上,MySQL的DELETE语句在某些情况下不支持表别名。这个问题可以通过移除表别名并直接使用表名来解决。
最低0.47元/天 解锁文章
336

被折叠的 条评论
为什么被折叠?



