Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation
1、出现问题
查询数据时报如题错误
2、解决方案
建表时需指定字符集,例如:
-- ----------------------------
-- Table structure for testTable
-- ----------------------------
CREATE TABLE testTable(
Id BIGINT(20) NOT NULL COMMENT '主键' ,
Name VARCHAR(200) NOT NULL COMMENT '名称' ,
InUserId BIGINT(20) NOT NULL COMMENT '添加人Id' ,
InName VARCHAR(20) NOT NULL COMMENT '添加人' ,
InTime BIGINT(20) NOT NULL COMMENT '添加时间' ,
UpUserId BIGINT(20) NOT NULL COMMENT '修改人Id' ,
UpName VARCHAR(50) NOT NULL COMMENT '修改人' ,
UpTime BIGINT(20) NOT NULL COMMENT '修改时间' ,
PRIMARY KEY (Id )
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='测试表';
以上就是Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation的介绍,做此记录,如有帮助,欢迎点赞关注收藏!
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation的更多相关文章
- Django的admin管理系统写入中文出错的解决方法/1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘locate’
Django的admin管理系统写入中文出错的解决方法 解决错误: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and ( ...
- java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' 异常处理,及MySQL数据库编码设置
java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,C ...
- Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' 解决方法
1. 代码 SHOW VARIABLES LIKE 'character_set_%'; 查看一下 显示 +--------------------------+------------------- ...
- b-is-in- (1267, "Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='") SELECT id FROM qqzoneshuoshuo WHERE words=
db-is-in- (1267, "Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_general_ci, ...
- Illegal mix of collations (big5_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation 'like'
解释: 非法的混合排序规则(big5_chinese_ci)和(utf8_general_ci)操作“like”. 原本是单个字段查询数据的,现在是把所有的字段用一个搜索框来查询. 主要出问题是下列这 ...
- 1267 - Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '=' | 1267 - Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (Latin,COERCIBL)
select * FROM information_schema.columns WHERE table_schema = "databaseName" and collation ...
- Mysql查询报错:Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
使用sql别名关联查询的时候,由于字符集冲突导致该错误 解决方案,查询的时候强制转换字符集类型 case when column = '' then _gbk '' collate gbk_chine ...
- 解决Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COER
今天在用java与mysql数据库时发现Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COER ...
- Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci...
最近刚接触mysql,今天用mysql插入中文字符的时候,程序报错“Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_g ...
- Mysql Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
MySQL字符串比较bug: select * from table_a a left join table_b b on a.field_a = b.field_b error: Illegal ...
随机推荐
- 【云原生 · Kubernetes】Kubernetes 编排部署GPMall(一)
1.规划节点 IP 主机名 节点 10.24.2.156 master Kubernetes master 节点 10.24.2.157 node Kubernetes worker 节点 2.基础准 ...
- pyinstaller打包TVM/RPC相关脚本及DSO文件
0. 创建anaconda env numpy中MKL/BLAS库占用很大空间.使用如下命令创建新环境,并替换numpy. conda create -n extranumpy python=3.8. ...
- DP?
杨斌涵//aad69d38 分治优化DP 分治优化1D/1D dp 对于一类 \[f(x) = \min_{k = y}^{x - 1} w(l, r) \] 即所有 \(w(l,r)\) 事先已知, ...
- Day24:static关键字
static static关键字是静态的意思,可以修饰成员方法.属性. static修饰的特点: 被类的所有对象共享 可以通过类名调用,也可以通过对象名调用:推荐使用类名调用! public clas ...
- linux deb系 apache 配置解析php文件
安装apache服务器和php服务 sudo apt-get install apache2 php 然后其实一般来说什么也不用安装了就可以成功解析php文件了 制作一个测试文件,test.php放到 ...
- linux 挂载 vdi 文件(virtual box虚拟机镜像文件)
1. 下载 vdfuse 下载地址 2.解压deb文件 解压deb安装包文件,这里不使用安装命令是因为你的virtualbox 可能和vdfuse的版本不一致,导致安装失败,而我们只需要用到 vdfu ...
- MyEclipse连接MySQL
在官网http://www.mysql.com/downloads/下载数据库连接驱动 本文中使用驱动版本为mysql-connector-java-5.1.40 一.创建一个java测试项目MySQ ...
- AI绘画提示词创作指南:DALL·E 2、Midjourney和 Stable Diffusion最全大比拼 ⛵
作者:韩信子@ShowMeAI 深度学习实战系列:https://www.showmeai.tech/tutorials/42 自然语言处理实战系列:https://www.showmeai.tech ...
- Flask框架使用SQLAlchemy的ORM
SQLAlchemy 1.介绍 SQLAlchemy是一个基于Python实现的ORM框架.该框架建立在 DB API之上,使用关系对象映射进行数据库操作,简言之便是:将类和对象转换成SQL,然后使用 ...
- pycharm 小技巧
ctrl键 + B 查看定义源代码 alt键 + enter键 查看帮助 ctrl键 + shift键 + -号 所有代码隐藏 ctrl键 + shift键 + +号 所有代码展示 ctrl键 + D ...