• 执行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
  • 相关阅读:
    Eclipse 3.6 中安装WindowBuilder Pro及使用SWT Designer
    BEC听力训练 方法
    在Eclipse安装Aptana插件
    failed to create JVM 解决办法
    BEC听力训练 方法2
    ATF/Installing
    Eclipse中如何配置SWT
    语音信号 :lms算法麦克风语音降噪
    图像信号 matlab滤波器设计1 :高通滤波器应用和设计
    matlab m文件
  • 原文地址:https://www.cnblogs.com/reblue520/p/6284396.html
Copyright © 2020-2023  润新知