阅读背景:

mybatis的报错总结_____2Error updating database. Cause: java.sql.SQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the ri

来源:互联网 

在编写动态sql时 trim的属性写错了,如下图:

错误示范:

(接口的xml配置文件中:)

1 <update id="modifyBill" parameterType="Bill"> 2 update smbms_bill 3 <trim suffix="set" prefixOverrides="," prefix="where id=#{id}"> 4 <if test="billCode!=null">billCode=#{billCode},</if> 5 <if test="productName!=null">productName=#{productName},</if> 6 <if test="productDesc!=null">productDesc=#{productDesc}</if> 7 </trim> 8 </update> 1 <u



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: