在utf8_general_ci和之间utf8_unicode_ci,性能方面有什么不同吗?
MySql上的错误消息:
Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
Run Code Online (Sandbox Code Playgroud)
我已经经历了其他几个帖子,但无法解决这个问题.受影响的部分与此类似:
CREATE TABLE users (
userID INT UNSIGNED NOT NULL AUTO_INCREMENT,
firstName VARCHAR(24) NOT NULL,
lastName VARCHAR(24) NOT NULL,
username VARCHAR(24) NOT NULL,
password VARCHAR(40) NOT NULL,
PRIMARY KEY (userid)
) ENGINE = INNODB CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE TABLE products (
productID INT UNSIGNED NOT NULL AUTO_INCREMENT,
title VARCHAR(104) NOT NULL,
picturePath VARCHAR(104) NULL,
pictureThumb VARCHAR(104) NULL,
creationDate DATE NOT NULL,
closeDate DATE NULL,
deleteDate DATE NULL, …Run Code Online (Sandbox Code Playgroud) 我在处理大量数据时遇到这个奇怪的错误......
Error Number: 1267
Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
SELECT COUNT(*) as num from keywords WHERE campaignId='12' AND LCASE(keyword)='hello again 昔 ã‹ã‚‰ ã‚ã‚‹ å ´æ‰€'
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能解决这个问题?我可以以某种方式逃避字符串,因此不会发生此错误,或者我是否需要以某种方式更改我的表格编码,如果是这样,我应该将其更改为什么?
我正在编写一个无法正常工作的查询
我的查询:
SELECT *
FROM admin_marker
WHERE admin_marker.city NOT IN (SELECT target FROM messsage)
Run Code Online (Sandbox Code Playgroud)
它说
#1267 - 操作'='的非法混合排序
(utf8_general_ci,IMPLICIT)和
(utf8_unicode_ci,IMPLICIT)