前几日在使用MySQL数据库的时候,出现了一处生存,故作此记载✍
问题描述
- mysql> desc exam;
- +---------+--------------+------+-----+---------+-------+
- | Field | Type | Null | Key | Default | Extra |
- +---------+--------------+------+-----+---------+-------+
- | id | int(11) | YES | | NULL | |
- | name | varchar(50) | YES | | NULL | |
- | chinese | decimal(3,1) | YES | | NULL | |
- | math | decimal(3,1) | YES | | NULL | |
- | english | decimal(3,1) | YES | | NULL | |
- +---------+--------------+------+-----+---------+-------+
复制代码
- 然后我使用insert into语句往这个表中插入了一条记载
- mysql> insert into exam values (1, '张三', 78, 89, 93);
复制代码
- ERROR 1366 (HY000): Incorrect string value: '\xE5\xBC\xA0\xE4\xB8\x89' for column 'name' at row 1
复制代码 细致阅读报错提示后,说是【位于第1行“name”列的字符串值“\xE5\xBC\xA0\xE4\xB8\x89”不正确】
问题排查
然后我思考了一下 |