这是我的表结构

mysql> describe students;
+--------+---------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+---------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(20) | NO | | NULL | |
| age | tinyint(3) unsigned | YES | | 0 | |
| height | decimal(5,2) | YES | | NULL | |
| gender | enum(' | YES | | NULL | |
+--------+---------------------+------+-----+---------+----------------+
5 rows in set, 2 warnings (0.01 sec) mysql>

插入数据的时候报错

mysql> insert into students values('5','平二','18','160',2);
ERROR 1366 (HY000): Incorrect string value: '\xB6\xFE' for column 'name' at row 1
mysql>

这是编码问题导致的,解决

mysql> set names gbk;
Query OK, 0 rows affected (0.00 sec) mysql> insert into students values('5','平二','18','160',2);
Query OK, 1 row affected (0.00 sec)

mysql插入数据报 (Incorrect string value: '\xB6\xFE' for column 'name' at row 1)的更多相关文章

  1. MySql 中文写入数据库乱码及Incorrect string value: '\xF0\x9F...' for column 'XXX' at row 1解决

    一.中文写入乱码问题 我输入的中文编码是 urf8 的,建的库是 urf8 的,但是插入MySQL总是乱码,一堆"???????????????????????".可以使用以下的方 ...

  2. MYSQL导入数据时,出现错误:Incorrect string value: '\xF0\x9F...' for column 'XXX' at row 1

    Incorrect string value: '\xF0\x9F...' for column 'XXX' at row 1 这个问题,原因是UTF-8编码有可能是两个.三个.四个字节.Emoji表 ...

  3. 该错误的解决办法:Incorrect string value: '\xF0\x9F...' for column 'XXX' at row 1

    Incorrect string value: '\xF0\x9F...' for column 'XXX' at row 1 这个问题,原因是UTF-8编码有可能是两个.三个.四个字节.Emoji表 ...

  4. Incorrect string value: '\xF0\x9F...' for column 'XXX' at row 1

    Incorrect string value: '\xF0\x9F...' for column 'XXX' at row 1 这个问题,原因是UTF-8编码有可能是两个.三个.四个字节.Emoji表 ...

  5. MySql系列:中文写入数据库出现错误java.sql.SQLException: Incorrect string value: '\xE5\xxxx' for column 'xxxx' at row 1及其解决方法

    在将kft-activiti-demo的数据库连接改为mysql之后,可以正常登陆,但是在新建请假流程的时候出现如下错误:   Caused by: java.sql.SQLException: In ...

  6. 解决mysql插入数据时出现Incorrect string value: '\xF0\x9F...' for column 'name' at row 1的异常

    这个问题,原因是UTF-8编码有可能是两个.三个.四个字节.Emoji表情或者某些特殊字符是4个字节,而MySQL的utf8编码最多3个字节,所以数据插不进去. 我的解决方案是这样的 1.在mysql ...

  7. mysql-异常Incorrect string value: '\xF0\x9F...' for column 'XXX' at row 1

    这个问题,原因是UTF-8编码有可能是两个.三个.四个字节.Emoji表情或者某些特殊字符是4个字节,而Mysql的utf8编码最多3个字节,所以数据插不进去. 网上摘抄的问题解决方案:http:// ...

  8. mysql进阶(二十二)MySQL错误之Incorrect string value: '\xE7\x81\xAB\xE7\x8B\x90...中文字符输入错误

    MySQL错误之Incorrect string value: '\xE7\x81\xAB\xE7\x8B\x90...' for column 'tout' at row 1中文字符输入错误 在实验 ...

  9. Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'img' at row 1故障

    Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'img' at ro ...

随机推荐

  1. JS数组遍历的十二种方式

    遍历有如下几种方式 数组方法 map forEach filter find findIndex every some reduce reduceRight 其他方法 for for in for o ...

  2. TinkPHP框架开发的CRMEB小程序商城v4.0二次开发集成支付宝支付

    前言 大家都知道支付宝支付和微信支付宝都只能局限在自己的平台,微信内支付宝支付是根本就不能使用,即使是公众号支付也需要跳转到外部浏览器才可以唤起支付宝支付,并且QQ浏览器唤起支付宝支付还是问题很多,所 ...

  3. SpringBoot中JPA,返回List排序

    这里简单示例,利用query,根据“createtime”字段,进行 desc 排序,最近日期的数据在最前面. public List<StatusEvent> findAll(Speci ...

  4. EXCEL 引用autocad vba,自动加载其类型库

    Sub AutoADDAutoCADTypeLib() Dim Ref As Variant Dim hasAutoTypeLib As Boolean, hasAXDBLib As Boolean, ...

  5. oeasy教您玩转linux010109clear清屏

     回忆上次内容 上次讲了灵魂三问 whatis whereis which 通过这三个问题,可以对命令基本了解,我们来试一下!!

  6. python3笔记-字典

    5 1 # 创建字典 6 2 d=dict(name='lily',age=18,phone='') 7 3 print(d) 4 # {'name': 'lily', 'age': 18, 'pho ...

  7. 目标检测中的IOU和CIOU原理讲解以及应用(附测试代码)

    上期讲解了目标检测中的三种数据增强的方法,这期我们讲讲目标检测中用来评估对象检测算法的IOU和CIOU的原理应用以及代码实现. 交并比IOU(Intersection over union) 在目标检 ...

  8. poi自动生成Ecxel表格和Chart图表

    最近因为业务需求,需要做poi自动导出Ecxel表格和Chart折线图的功能. 所以我在网上找到了一篇关于poi生成Chart图表的博客,代码很详细,但是缺少相关注释说明. 想要将它改造成自己需要的样 ...

  9. python模块:excel的读和修改xlrd/xultils

    一.xlrd xlrd只能对excel进行读取,不可编辑修改.该模块属于第三方模块,需要安装模块包并引入.pip install xlrd 常用的方法: import xlrd book = xlrd ...

  10. White Bird(AOJ 2308)

    原题如下: Angry Birds is a mobile game of a big craze all over the world. You were convinced that it was ...