【YashanDB 知识库】解决 mybatis 的 mapper 文件 sql 语句结尾加分号 ";" 报错

本文内容来自 YashanDB 官网,原文内容请见 解决 mybatis 的 mapper 文件 sql 语句结尾加分号 ";" 报错 - YashanDB

现象

mybatis 或 mybaits-plus 的 mapper 文件 sql 结尾加分号 ";"

执行时报错:”YAS-04209 unexpected word;“

IMG_256

解决办法

将 sql 结尾分号 “;” 去掉。

使用注解方式写的 sql 语句也会遇到同样的问题,解决办法一样,去掉分号”;“。

IMG_256


请使用浏览器的分享功能分享到微信等