当前位置:网站首页>ERROR 1366 (HY000): Incorrect string value: ‘\xE8\xB5\xB5\xE9\x9B\xB7‘ for column ‘s_ name‘ at row 1
ERROR 1366 (HY000): Incorrect string value: ‘\xE8\xB5\xB5\xE9\x9B\xB7‘ for column ‘s_ name‘ at row 1
2022-07-27 18:45:00 【Ding Dang's fantasy】
mysql An error caused by a character set that does not meet the requirements
One of the reasons : The character set is not specified when creating the table , Used after creating fields alter table Student default charset=utf8; Changed the character set to utf8; But it doesn't work for the created fields ;
use show create table table_name\G;
View table creation
mysql> show create table Student\G;
*************************** 1. row ***************************
Table: Student
Create Table: CREATE TABLE `Student` (
`s_id` int(11) NOT NULL AUTO_INCREMENT,
`s_name` varchar(10) CHARACTER SET latin1 DEFAULT NULL,
`s_birth` varchar(10) CHARACTER SET latin1 DEFAULT NULL,
`s_sex` enum(' male ',' Woman ') NOT NULL DEFAULT ' male ',
PRIMARY KEY (`s_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
It is found that the character set of the table is different from that of the field
Modify the character set of the field :
alter table Student modify s_name varchar(10) character set uft8;
边栏推荐
- JDBC learning day1:jdbc
- 2021.7.17笔记 mysql其他命令
- 机器学习——SVM训练集只有一类标签数据而引发的错误
- Using Jieba and pyhanlp tools to extract keyword words and sentences
- Error launching IDEA
- 2021.7.12 internal and external connection of notes
- Solve the problem of JSP cascading
- [yuntu said] 249 mobile application security service - app's physical examination center, comprehensive testing, safe on the road!
- Quick access to website media resources
- 音乐律动七彩渐变灯芯片--DLT8S04A-杰力科创
猜你喜欢

USB充电式暖手宝芯片-DLTAP602SC-杰力科创

Ant privacy computing innovation tee technology has won academic recognition

这样的API网关查询接口优化,我是被迫的

2021.8.6笔记 jsoup

Visual Studio Code安装教程(超详细)

阿里p8总结的10条 SQL 优化方案(非常实用)

迷你洗衣机触摸芯片-DLT8MA12TS-杰力科创

Why don't you like it? It's easy to send mail in ci/cd

2021.7.13笔记 子查询

V-bind and V-for
随机推荐
Alibaba architects spent 280 hours sorting out 1015 pages of distributed full stack pamphlets to easily start the distributed system
Mybtis-Plus常用的内置方法
阿里p8总结的10条 SQL 优化方案(非常实用)
JDBC learning day1:jdbc
Visual studio code installation tutorial (super detailed)
uniapp运行到手机(真机调试)
2021.8.1 Notes database design
2021.7.22笔记 约束
2021.7.19笔记 DML
TypeError: conv2d(): argument ‘padding‘ (position 5) must be tuple of ints, not str【报错】
rsa加解密(兼容微信小程序环境)
A case to understand MySQL view
Wechat applet wechat payment overview
你有没有在MySQL的order by上栽过跟头
2021.8.6 notes jsoup
MySQL learning Day1 DDL, DML, DQL basic query
MySQL code database creation parking management system foreign key
解决Jsp级联问题
2021.7.18笔记 mysql数据类型
Uniapp H5 cross domain problem