MySQL查询:Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) fo
程序员文章站
2022-06-09 18:44:44
1.问题 ‘这是一个数据库编码的问题,表是通过groovy初始化进去的。下面是这两张表的字段编码:这两个关联的字段编码不同所以无法关联查询。COLLATE是用来做什么的:https://www.cnblogs.com/jpfss/p/11548826.htmlmysql 修改排序规则:https://www.cnblogs.com/-renyu/p/10776020.htmlSELECTCONCAT( 'ALTER TABLE `',......
1.问题
‘这是一个数据库编码的问题,表是通过groovy初始化进去的。
下面是这两张表的字段编码:
这两个关联的字段编码不同所以无法关联查询。
COLLATE是用来做什么的: https://www.cnblogs.com/jpfss/p/11548826.html
mysql 修改排序规则:https://www.cnblogs.com/-renyu/p/10776020.html
SELECT
CONCAT( 'ALTER TABLE `', TABLE_NAME, '` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;' ) AS 'Copy & run these SQL statements:'
FROM
INFORMATION_SCHEMA.TABLES
WHERE
TABLE_SCHEMA = "base_service"
AND TABLE_COLLATION != "utf8mb4_general_ci"
AND TABLE_TYPE = "BASE TABLE";
将查询出来的语句执行即可,然后查询通过
本文地址:https://blog.csdn.net/weixin_37650458/article/details/107676719
上一篇: 微信小程序实现视频功能(一):视频上传
下一篇: 前端面试宝典
推荐阅读
-
解决 Mysql Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)
-
对mysql Illegal mix of collations(gbk_chinese_ci,IMPLICIT) a_MySQL
-
MySQL查询:Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) fo
-
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (_MySQL
-
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (_MySQL
-
解决 Mysql Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)
-
对mysql Illegal mix of collations(gbk_chinese_ci,IMPLICIT) a_MySQL
-
MySQL查询:Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) fo