MYSQL非法混合排序错误 [英] MYSQL Illegal mix of collations Error

查看:80
本文介绍了MYSQL非法混合排序错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

CREATE  PROCEDURE updateparentprofile(
_usercode varchar(200),
_address varchar(200),
_fatherEmail varchar(200),
_parentusername varchar(200),
_parentpassword varchar(200),
_motherEmail varchar(200)
)
begin

update parentmaster set fatherEmail=_fatherEmail,motherEmail=_motherEmail where usercode = _usercode;

update studentmaster set fatherEmail=_fatherEmail,motherEmail=_motherEmail,address=_address where usercode = fn_getStudentUCByParent(_usercode);

update usersmaster set username=_parentusername,password=_parentpassword where usercode=_usercode;

end;





错误



非法混合排序(latin1_swedish_ci,IMPLICIT)和(utf8_general_ci,COERCIBLE)进行操作'='



ERROR

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

推荐答案

创建程序updateparentprofile(

_usercode varchar(200),

_address varchar(200),

_fatherEmail varchar(200),

_parentusername varchar(200),
_parentpassword varchar(200),

_motherEmail varchar(200)



开始



DECLARE _Pusercode varchar(200);

set _Pusercode = fn_getStudentUCByParent(_usercode);

更新parentmaster set fatherEmail = _fatherEmail,motherEmail = _motherEmail where usercode = _usercode;



更新studentmaster set fatherEmail = _fatherEmail,motherEmail = _motherEmail,address = _address where usercode = _Pusercode;



更新usersmaster set username = _parentusername,passwo rd = _parentpassword where usercode = _usercode;



end;
CREATE PROCEDURE updateparentprofile(
_usercode varchar(200),
_address varchar(200),
_fatherEmail varchar(200),
_parentusername varchar(200),
_parentpassword varchar(200),
_motherEmail varchar(200)
)
begin

DECLARE _Pusercode varchar(200);
set _Pusercode = fn_getStudentUCByParent(_usercode);
update parentmaster set fatherEmail = _fatherEmail, motherEmail = _motherEmail where usercode = _usercode;

update studentmaster set fatherEmail = _fatherEmail, motherEmail = _motherEmail, address = _address where usercode = _Pusercode;

update usersmaster set username = _parentusername, password = _parentpassword where usercode = _usercode;

end;


这篇关于MYSQL非法混合排序错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆