gpt4 book ai didi

mysql - 为什么这个错误 : Illegal mix of collations (utf8_general_ci, IMPLICIT) and (utf8_bin,NONE) for operation '=' , ON THIS QUERY?

转载 作者:行者123 更新时间:2023-11-30 23:34:51 25 4
gpt4 key购买 nike

查询:

select *,
(@page_path = concat(
@page_path,
chk_v_application_tree.alias
)) as path
from chk_v_application_tree

[Err] 1267 - Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_bin,NONE) for operation '='

最佳答案

尝试:

select *,
(@page_path = concat(
CONVERT(@page_path USING utf8) COLLATE utf8_bin,
chk_v_application_tree.alias
)) as path
from chk_v_application_tree

因为您不能在 CONCAT(utf8_general_ci, utf8_bin) 等 CONCAT 函数中混合使用字符集编码。

关于mysql - 为什么这个错误 : Illegal mix of collations (utf8_general_ci, IMPLICIT) and (utf8_bin,NONE) for operation '=' , ON THIS QUERY?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8320615/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com