Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
2017-07-18 11:13
721 查看
[sql] view
plain copy
SELECT
a.equ_no,
b.fullCode
FROM
equipment a,
(
SELECT
t.*, getEquTypeFullCode (t.equType_id) AS fullCode
FROM
equ_type t
) b
WHERE
substring(a.equ_no, 1, 5) = b.fullCode
错误如下:
[plain] view
plain copy
[Err] 1267 - Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
解决方法:将比较等式一边进行字符串转换,如改为“CONVERT(b.fullCode
USING utf8) COLLATE utf8_unicode_ci”
[sql] view
plain copy
SELECT
a.equ_no,
b.fullCode
FROM
equipment a,
(
SELECT
t.*, getEquTypeFullCode (t.equType_id) AS fullCode
FROM
equ_type t
) b
WHERE
substring(a.equ_no, 1, 5) = CONVERT(b.fullCode USING utf8) COLLATE utf8_unicode_ci;
--本篇文章转自:http://blog.csdn.net/hellostory/article/details/7266447
plain copy
SELECT
a.equ_no,
b.fullCode
FROM
equipment a,
(
SELECT
t.*, getEquTypeFullCode (t.equType_id) AS fullCode
FROM
equ_type t
) b
WHERE
substring(a.equ_no, 1, 5) = b.fullCode
错误如下:
[plain] view
plain copy
[Err] 1267 - Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
解决方法:将比较等式一边进行字符串转换,如改为“CONVERT(b.fullCode
USING utf8) COLLATE utf8_unicode_ci”
[sql] view
plain copy
SELECT
a.equ_no,
b.fullCode
FROM
equipment a,
(
SELECT
t.*, getEquTypeFullCode (t.equType_id) AS fullCode
FROM
equ_type t
) b
WHERE
substring(a.equ_no, 1, 5) = CONVERT(b.fullCode USING utf8) COLLATE utf8_unicode_ci;
--本篇文章转自:http://blog.csdn.net/hellostory/article/details/7266447
相关文章推荐
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- [Err]1267 - Illegal mix of collations(utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=’
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '
- Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=
- Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '
- Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLIC
- Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLIC
- Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLIC
- 处理【Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operatio】
- java.sql.SQLException: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general
- Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='
- Mysql Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='