昨天遇到这个问题,Data too long for column 'name',我还以为是数据库字段长度设置小了,最后发现不是啊,然后百度了一下,给出的答案也都不靠谱。最后检查了一下sql,发现根本就是name字段不小心写了两个,update digital_furniture
set
<if test="name != null">
name = #{name},
</if>
<if test="thumbnail != null">
name = #{thumbnail},
</if>,这样引起的,所以遇到这个问题还是好好查看你的sql有没有写错吧
set
<if test="name != null">
name = #{name},
</if>
<if test="thumbnail != null">
name = #{thumbnail},
</if>,这样引起的,所以遇到这个问题还是好好查看你的sql有没有写错吧