• 执行update语句mysql5.6报错ERROR 1292 (22007): Truncated incorrect DOUBLE value: '糖糖的坤大叔'


    执行修改语句update tbl_user_details set nickname=CONCAT("用户",yunva_id) where nickname = yunva_id;


    报错:
    ERROR 1292 (22007): Truncated incorrect DOUBLE value: '糖糖的坤大叔'


    查看sql模式
    mysql> show session variables like '%sql_mode%';
    +---------------+--------------------------------------------+
    | Variable_name | Value                                      |
    +---------------+--------------------------------------------+
    | sql_mode      | STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION |
    +---------------+--------------------------------------------+
    1 row in set (0.00 sec)

    mysql> update tbl_user_details set nickname=CONCAT("用户",yunva_id) where nickname = yunva_id;
    ERROR 1292 (22007): Truncated incorrect DOUBLE value: '糖糖的坤大叔'

    解决办法:设置sql_mode为非严格模式,问题解决

    mysql> set sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
    Query OK, 0 rows affected (0.00 sec)


    mysql> show session variables like '%sql_mode%';
    +---------------+--------------------------------------------+
    | Variable_name | Value                                      |
    +---------------+--------------------------------------------+
    | sql_mode      | NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
    +---------------+--------------------------------------------+
    1 row in set (0.00 sec)


    mysql> update tbl_user_details set nickname=CONCAT("用户",yunva_id) where nickname = yunva_id;
    Query OK, 101622 rows affected, 14594 warnings (2.65 sec)
    Rows matched: 101622  Changed: 101622  Warnings: 14594
  • 相关阅读:
    go语言最新版本 下载地址
    PHP5 各版本维护时间
    springzuul本地路由和跨服务器路由问题
    大数据学习路线(转载)
    springcoud feign超时的问题
    java 桥接模式
    springcloud单个服务内存使用详情
    centos7搭建filebeat
    centos7搭建logstash
    centos7搭建kibana
  • 原文地址:https://www.cnblogs.com/reblue520/p/6284396.html
Copyright © 2020-2023  润新知