check the manual that corresponds to your MySQL server version for the right syntax to use near

     <update id="updateWarehouseResources"  parameterType="java.util.Map">
    	update nddp_test.config_warehouse_resources
			<trim prefix="set" suffixOverrides=",">
                <if test="name != null"> name=#{name}, </if>
                <if test="order != null"> order=#{order}, </if>
                <if test="offline != null"> offline=#{offline}, </if>
                <if test="repair != null"> repair=#{repair}, </if>
            </trim>
		where id = #{id}
    </update>
### Error updating database.  Cause: 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 'order='4800',
                offline='3800',
                repair='77' 
		whe' at line 3

注意这种一般情况下是语法问题,说明mysql的各种语句还是不够熟练,

(1)看表名是不是使用了Mysql的关键字,如果是,请立马改掉;(我的错误使用了MySQL的关键字!)

(2)语句给出哪里错误,如我的题目中给出“near”,说明在那附近有问题,或者在where前多加了逗号,去掉就行了

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

江湖行骗老中医

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值