给大家先看下我建表的代码:
create table zeng0822(
id int primary key auto_increment,
sname varchar(10) not null default "",
gender char(1) not null default "",
company varchar(20) not null default "",
salary decimal(6,2) not null default 0.00,
fanbu smallint not null default 0
)engine myisam charset utf8;问题一:
添加数据过程中发现gender列写"男"出现错误;问题二:
第一次在sname列添加两字中文姓名是没问题的,第二次选了sname/gender/salary三列添加数据,告诉我
ERROR 1366 (HY000): Incorrect string value: '\x80\xE9\x94\x8B' for column 'sname' at row 1、问题一我直接输入1来暂时解决了插入问题,但是还不明白;
问题二查阅了许多办法,包括在/etc中新建my.cnf文件(反而导致无法启动mysql)、将MYSQL数据库统一设置成: gbk格式等等都不好用。
自学小白求各位大神帮忙解答!
create table zeng0822(
id int primary key auto_increment,
sname varchar(10) not null default "",
gender char(1) not null default "",
company varchar(20) not null default "",
salary decimal(6,2) not null default 0.00,
fanbu smallint not null default 0
)engine myisam charset utf8;问题一:
添加数据过程中发现gender列写"男"出现错误;问题二:
第一次在sname列添加两字中文姓名是没问题的,第二次选了sname/gender/salary三列添加数据,告诉我
ERROR 1366 (HY000): Incorrect string value: '\x80\xE9\x94\x8B' for column 'sname' at row 1、问题一我直接输入1来暂时解决了插入问题,但是还不明白;
问题二查阅了许多办法,包括在/etc中新建my.cnf文件(反而导致无法启动mysql)、将MYSQL数据库统一设置成: gbk格式等等都不好用。
自学小白求各位大神帮忙解答!
解决方案 »
- MySQL 触发器定义的变量报错
- SNS Webgame 社区类页面网游开发的数据库缓存问题
- mysql的时间段查询
- 数据库约束问题
- 觉得来Mysql这里问最合适,关于IM服务器设计中数据库的使用.
- 一条sql语句
- SET GLOBAL log_bin_trust_function_creators = 1 如何在my.cnf里面配置?
- mysql的编码问题
- 如何将Access数据库导入到mysql中
- Connector/C libmsyql.dll版本问题
- 两台电脑win7/10,同一版本数据库,同一个查询语句,同样的索引,查询时间前者22秒,后者1秒
- 求助!关于Datagrip的MySQL的问题!
参考:https://blog.csdn.net/weixin_43249665/article/details/87946287