如何解决Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,IMPLICIT)的问题
来源:互联网 发布:上古卷轴5梦璃捏脸数据 编辑:程序博客网 时间:2024/06/05 03:09
在执行以下SQL语句时
sql = "select reject_id, rejectdate,rejectreason, receivedocdate, receivedoctime from rejectprj where fhbh=(selectfhbh from reviewprj where id=?) order by reject_id desc " ;
出现以下错误:
Illegal mix of collations(latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,IMPLICIT) for operation '='错误
进入MySQL,分别查看rejectprj和reviewprj两个表的结构,通过show full columns from <table>,查看其Collation,如下图
其中reviewprj的fhbh为gbk_chinese_ci,而rejectprj的fhbh为latin1_swedish_ci,所以当两表通过fhbh关联时,就会出现以上错误。
则通过以下命令将rejectprj的fhbh的Collation更改为gbk_chinese_ci。
mysql>alter table rejectprj changecolumn fhbh fhbh varchar(20) character set 'gbk_chinese_ci';
这样修改后,执行以上SQL命令不会出错了。
0 0
- 如何解决Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,IMPLICIT)的问题
- 解决Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,IMPLICIT) for operation
- 解决Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,COERCIBLE) for operatio
- 解决"Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)
- Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
- 对 mysql Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (gb2312_chinese_ci,I的解决
- 对 mysql Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (gb2312_chinese_ci,I的解决
- 对 mysql Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (gb2312_chinese_ci,I的解决
- Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (latin1_swedish_ci,IMPLICIT)错误的解决方案
- Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COER) 解决办法
- Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COER
- 解决Mysql:Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
- mysql错误提示Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)的一个解决办法
- mysql错误提示Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)的一个解决办法
- 解决amazon RDS 出现“Illegal mix of collations (latin1_swedish_ci,IMPLICIT)”的解决办法
- Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='
- 解决 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)
- java.sql.SQLException: Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
- oi启航
- cocos2d CCDictionary
- 笔记_Maya动画中功能___摄像机____<围绕主体旋转>
- 设计模式---工厂模式
- ANDROID缩略图Thumbnails
- 如何解决Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gbk_chinese_ci,IMPLICIT)的问题
- 一个好用的查询不同国家时间的网站timeanddate.com
- Android Camera API2.0下全新的Camera FW/HAL架构简述
- LeetCode 111: Minimum Depth of Binary Tree
- diff && patch 命令制作补丁
- iOS行业
- iOS 9 适配系列教程
- Java AbstractCollection源码分析
- ZOJ 1099这道题如果从文件中读取数据,最关键的地方是处理好空格,按时我一直没有成功,所以这道题中没有使用文件