提示的原因是“ xxx  ”double型不是正确的,错误的原因在于把数据库

update user  set username='xxx',password='yyy' where id='zzz'

错写成

update user  set username='xxx' and password='yyy' where id='zzz'

将分隔符,错写为and

如果是用ssm框架的话,正确的写法应该是:

<update id="updateUser" parameterType="user">
        update sys_user
        <set >
            <if test="user_name!=null">
            user_name=#{user_name} ,
            </if>
            <if test="user_password!=null">
            user_password=#{user_password},
            </if>
        </set>
        where user_id=#{user_id}
    </update>


com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE

相关文章: