1、问题
5.7版本的mysql 删除时用别名报错,如:
delete from user u where id=123
会报u附近有语法错误
2、解决
换成如下写法即可
delete u from user u where id=123
3、注意
mysql 5.7 存在此问题,而8.0+ 两种写法都可以
5.7版本的mysql 删除时用别名报错,如:
delete from user u where id=123
会报u附近有语法错误
换成如下写法即可
delete u from user u where id=123
mysql 5.7 存在此问题,而8.0+ 两种写法都可以