【MyBatis报错-your MySQL server version for the right syntax to use near ‘‘ at line 1】

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 ‘’ at line 1
; bad SQL grammar []; nested exception is 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 ‘’ at line 1 at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:239)

<update id="updateStatus">
        update user set status = #{status} where id = #{id}
</update>


 <update id="updateStatus">
         update user set status = #{status} where id = **{#id}**
 </update>

总结:在写MyBtais中的SQL语句一定要格外注意


版权声明:本文为weixin_45915965原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。