数据库错误1064及解决
昨天在做后台管理项目时执行的代码
<update id="updateUserMoney" parameterType="com.youyu.war.entity.po.UserPo">
UPDATE user
SET money = #{money},
WHERE id = #{id};
</update>
始终不能运行,当时给我的错误时:
SQL 错误 [1064] [42000]: 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 'WHERE id = 1004' at line 3
在idea中改了一整天也没有成功修复这个bug,后来在dbeaver里用SQL编辑器查了一下,问题是我的MySQL语句有些问题,后来检查了一遍发现是money后面的“,”的问题,在下图的光标位置做出修改后问题解决了:
标签:错误,money,数据库,1064,SQL,id From: https://www.cnblogs.com/childewei/p/16994105.html