rank在MySQL 8.0里是作为保留关键字,固业务要更改SQL才能适配!!!具体请看下面的截图:
RANK
(R); added in 8.0.2 (reserved)
参考手册:https://dev.mysql.com/doc/refman/8.0/en/keywords.html
这是MySQL 5.7,该SQL顺利执行:
这是MySQL 8.0,直接报错!
RANK
(R); added in 8.0.2 (reserved)
参考手册:https://dev.mysql.com/doc/refman/8.0/en/keywords.html
这是MySQL 8.0,直接报错!
select * from t3 where `rank`<=10;