mysql调用存储过程出现Illegal mix of collations错误
执行sql语句正常
执行存储过程 异常
提示
Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='
解决办法
CREATE PROCEDURE `proce_test`(admin_name VARCHAR(32) charset utf8)
问题描述:MySQL进行字符串比较时发生错误:
错误如下:
解决方法:将比较等式一边进行字符串转换,如改为“CONVERT(b.fullCode USING utf8) COLLATE utf8_unicode_ci”
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;
mysql调用存储过程出现Illegal mix of collations错误的更多相关文章
- MySQL查询时报错Illegal mix of collations
开发十年,就只剩下这套架构体系了! >>> 1.具体场景 两张表分别为: CREATE TABLE `tb_user` ( `id` bigint(20) NOT NULL AU ...
- 【mysql】[Err]1267 - Illegal mix of collations(utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation ‘=
ALTER TABLE table_name CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;
- 彻底解决phpcms v9升级后,文章发布出现: Mysql 1267错误:MySQL Error : Illegal mix of collations 解决办法
彻底解决phpcms v9升级后,文章发布出现: MySQL Query : SELECT * FROM `withli_a`.`v9_keyword` WHERE `keyword` = '吼吼' ...
- 解决Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COER
今天在用java与mysql数据库时发现Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COER ...
- Illegal mix of collations for operation 'like' while searching with Ignited-Datatables
Stack Overflow Questions Developer Jobs Tags Users Log In Sign Up Join Stack Overflow to learn, sh ...
- MySQL replication illegal mix of collations
MySQL replication case 一则 转载:http://www.vmcd.org/2013/09/mysql-replication-case-%E4%B8%80%E5%88%99/ ...
- Mysql Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
MySQL字符串比较bug: select * from table_a a left join table_b b on a.field_a = b.field_b error: Illegal ...
- MySQL Error: Illegal mix of collations for operation 'concat'
在使用concat连接字符串时出现错误:MySQL Error: Illegal mix of collations for operation 'concat' 原因:字段操作默认为UTF8的编码, ...
- mysql 客户端连接报错Illegal mix of collations for operation
服务端用的是utf-8,客户端工具打开表和视图是会报Illegal mix of collations for operation错误,经排查,可以采用以下语句解决 SET character_set ...
随机推荐
- mdadm Raid5 /dev/md0 lost a disk and recovery from another machine
centos -- how to add a new disk into a mdadm raid5 /dev/md0 which lost a /dev/sdc1 disk and revoery ...
- 概述struts,以及struts如何实现MVC架构的
概述MVC体系结构? 答:MVC包括三类对象,model是应用对象,view是视图,controller是控制器,它定义用户界面对用户输入的响应方式. 在MVC体系中,模型通常被称为”业务逻辑”,是真 ...
- [BZOJ 1804] Flood
Link: BZOJ 1804 传送门 Solution: 不容易啊,第一道完全自己A掉的IOI题目..... 算法思想其实很简单: 模拟缩减的过程即可 将每条边转为2条有向边,每次找到最左边的边,沿 ...
- spring boot 2.x静态资源会被HandlerInterceptor拦截的原因和解决方法
在spring boot 1.5.x中,resources/static目录下的静态资源可以直接访问,并且访问路径上不用带static,比如静态资源放置位置如下图所示: 那么访问静态资源的路径可以是: ...
- 收藏起来,史上最全的 MySQL 高性能优化实战总结!
转自:https://mp.weixin.qq.com/s/sRsJzFO9dPtKhovJNWN3Dg 一.前言 MySQL 对于很多 Linux 从业者而言,是一个非常棘手的问题,多数情况都是因为 ...
- UdpClient类客户端和服务端demo
服务端demo static IPEndPoint ipe = new IPEndPoint(IPAddress.Any, 0); static UdpClient udp = new UdpClie ...
- javascript:判断支持哪种监听
if (typeof window.addEventListener != "undefined") { window.addEventListener("load&qu ...
- 学习Struts2.3
</pre>1.struts2.3核心jar包(若首次接触,可临时略过不看)大家能够到http://struts.apache.org/download.cgi#struts2014下载s ...
- Flask+uwsgi+Nginx环境搭建
开源软件准备需要的软件列表:setuptools-33.1.1.zipPython-2.7.13.tgzpip-9.0.1.tar.gznginx-1.10.3.tar.gz软件统一上传到/usr/l ...
- centos7 ping127.0.0.1不通
ping 127.0.0.1,localhost和本地ip都不通,所有的配置也是正确的 检查下是否禁止了ping vim /proc/sys/net/ipv4/icmp_echo_ignore_all ...