MySQL存储过程中操作'='的排序规则(utf8_general_ci,IMPLICIT)和(utf8_unicode_ci,IMPLICIT)的非法混合 [英] Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '=' in MySQL Stored Procedure
问题描述
我检查了数据库表,发现它位于latin1_swedish_ci
中,因此我将其更改为utf8_general_ci
,然后将所有字段的归类从latin1_swedish_ci
更改为utf8_general_ci
.
I checked the database table and found it was in latin1_swedish_ci
so i've changed it to utf8_general_ci
then I changed the collation from latin1_swedish_ci
to utf8_general_ci
for all the fields.
仍然给我同样的错误.
操作'='的归类(utf8_general_ci,IMPLICIT)和(utf8_unicode_ci,IMPLICIT)的非法混合
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='
谢谢
推荐答案
所以答案很简单.似乎您错过了MKJ ^^所述的更改,但是更改表的实际语法如下所示.
so the answer is simple. It seems you missed the change as stated by MKJ ^^ but the actual syntax to alter your tables looks like this.
alter table `dbname`.`tablename` convert to character set utf8 collate utf8_general_ci;
作为单独的脚本或在创建表语句的末尾应用,您应该能够将所有相关表关联回同一字符集
Applied as an individual script or at the end of your create table statement you should be able to relate all related tables back to the same charset
这篇关于MySQL存储过程中操作'='的排序规则(utf8_general_ci,IMPLICIT)和(utf8_unicode_ci,IMPLICIT)的非法混合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!