MySQL在使用UNION查询时或者创建视图时报:异常:SQL error: #1271 - Illegal mix of collations for operation 'UNION',此类问题是由于UNION Mysql的Table的时候对应的字段Collation字符序不同导致的,如下图所示:

  • 创建视图或者查询时采用UNION ALL报异常

  • 通过WorkBench查看相关查询的表的详细信息发现字符类型的字段的Collation不同

  • 通过修改字段的Collation解决此类错误,或者创建字段的时候统一字段的Collation

此为本人原创作品,未经允许请勿转载,否则将依法追究责任!!!

转载于:https://www.cnblogs.com/hongthink/p/6225468.html

MySQL SQL error: #1271 - Illegal mix of collations for operation 'UNION'相关推荐

  1. mysql general error,mysql General error: 1267 Illegal mix of collations错误​

    在项目迁移之后一个视图的访问出现了问题,报了mysql的1267错误,具体报错信息就是 SQLSTATE[HY000]: General error: 1267 Illegal mix of coll ...

  2. mysql illegal mix of_mysql提示:Illegal mix of collations for operation ‘UNION’

    语句很简单 代码如下 ?php $connection=mysql_connect(localhost,root,password); //连接并选择数据库服务器 mysql_select_db(te ...

  3. Error 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT

    Mysql 报错: `Error 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_c ...

  4. Error 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT)

    @[TOC](Error 1267 Illegal mix of collations (utf8mb4_unicode_ci,IMPLICIT) and (utf8mb4_general_ci,IM ...

  5. 报错:Illegal mix of collations

    问题: 服务端报错:Error: ER_CANT_AGGREGATE_2COLLATIONS: Illegal mix of collations (latin1_swedish_ci,IMPLICI ...

  6. MySQL replication illegal mix of collations

    MySQL replication case 一则 转载:http://www.vmcd.org/2013/09/mysql-replication-case-%E4%B8%80%E5%88%99/ ...

  7. MySQL:Illegal mix of collations (utf8_general_ci,COERCIBLE) and (gbk_chinese_ci,IMPLICIT) for operat

    MySQL:Illegal mix of collations (utf8_general_ci,COERCIBLE) and (gbk_chinese_ci,IMPLICIT) for operat ...

  8. mysql Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) fo...

    错误:"Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for ...

  9. Illegal mix of collations (XXX) and (XXX) for operation ‘XXX’

    问题描述: mybatis使用INSTR的时候报错(数据库为MySQL)-- Illegal mix of collations (XXX) and (XXX) for operation 'XXX' ...

  10. 调用存储过程时报错:Illegal mix of collations

    调用存储过程时,发生报错,信息如下: ERROR 1267 (HY000): Illegal mix of collations (gb2312_chinese_ci,IMPLICIT) and (l ...

最新文章

  1. Java Web学习总结(13)——JSP入门
  2. HDU4970 Killing Monsters dp
  3. wxWidgets:wxHyperlinkEvent类用法
  4. 无法嵌入互操作类型 请改用适用的接口_机器视觉可用的不同电缆和连接器类型以及相关利弊分析...
  5. Linux的FHS(文件系统结构标准)剖析
  6. 一个完整的数据分析体系,该长啥样?
  7. tfs 安装mysql.h_如何在centos5或centos7上编译安装tfs rcserver 模块?
  8. 如何面试一位前端工程师
  9. apache+php
  10. 蓝桥杯 ALGO-58 算法训练 字串逆序
  11. 称称八字几两命——莫当真
  12. 【JOURNAL】《题虾壶》
  13. 下载用于编译的OpenJDK源码链接
  14. HTML5图片上传插件
  15. IBM X 345服务器无法从光驱启动配置解决方法——非常规方法
  16. 《Adobe Premiere Pro CS6中文版经典教程》——复习题
  17. 《响应式Web设计性能优化》一2.3 Web运行时性能
  18. 青龙面板-快手极速版(每天3块脚本)
  19. CAS单点登录(SSO)介绍及部署
  20. 史上最全-常见正则表达式集合

热门文章

  1. oracle 手动链库,Oracle 数据库干数据库链(Database links)的两个例子
  2. oracle11g服务配置,oracle11g dg broker配置服务的高可用
  3. 大学里学的单片机和网课一对一学单片机有什么区别
  4. 阅读分布式锁文章总结
  5. double除以int结果是int吗_游戏开发java中int可以用汉字吗?
  6. 【渝粤题库】陕西师范大学800009 环境变迁
  7. 【ICLR 2018】模型集成的TRPO算法【附代码】
  8. 【javascript】手写一个webpack plugin
  9. 使用append()方法,原先的js不起作用
  10. mysql 无法退出sql命令行编辑