UNION关键字报错:ERROR 1222 (21000): The used SELECT statements have a different number of columns
来源:互联网 发布:小猪佩奇中的小羊知乎 编辑:程序博客网 时间:2024/05/02 07:17
今天进行总结时,发现这个错误,后来,发现这是由于union 造成。
在使用union时,有以下规则。
1.必须由两条或者两条以上的select语句组成,语句之间用关键字union分隔
2.每个查询中必须包含相同的列,表达式或聚集函数(顺序可以不同)
3.列数据类型必须兼容,类型不必完全相同,但必须是DBMS可以隐含地转换的类型。
其中上面的错误就是犯了第二条的规则。图中给出了标记。
0 0
- UNION关键字报错:ERROR 1222 (21000): The used SELECT statements have a different number of columns
- ERROR 1222 (21000): The used SELECT statements have a different number of columns
- The used SELECT statements have a different number of columns
- [Err] 1222 - The used SELECT statements have a different number of columns
- The used SELECT statements have a different number of columns 错误解决
- mysql The used SELECT statements have a different number of columns
- Nhibernate: Foreign key must have same number of columns as the referenced primary key
- have a better understand of the coordinate used in 3D
- Is there a limit to the number of columns in an HBase row?
- "Out of Memory" error message appears when you have a large number of programs running
- What are the different kinds of parsers used in XML?
- 解决报错 Page directive: illegal to have multiple occurrences of contentType with different values (old:
- UNION operator must have an equal number of expressions
- Android studio 报Error:The number of method references in a .dex file cannot exceed 64K错误
- eclipe启动报错Multiple Contexts have a path of
- 报错Application windows are expected to have a root view controller at the end of application launc
- mysql报错"ERROR 1206 (HY000): The total number of locks exceeds the lock table size"的解决方法
- mysql报错-ERROR 1206 (HY000)- The total number of locks exceeds the lock table size-的解决方法
- 面向UI编程:ui.js 1.0 粗糙版本发布,分布式开发+容器化+组件化+配置化框架,从无到有的艰难创造
- 数组Mex
- 764E Timofey and remoduling[数学]
- 基于ROS平台的移动机器人-5-Kinect2驱动的安装和ROS下的测试
- python输出格式化及函数format
- UNION关键字报错:ERROR 1222 (21000): The used SELECT statements have a different number of columns
- 热修复技术
- c/c++多文件相互调用,为解决ERROR LNK:2005
- 从零开始写linux字符设备驱动程序(一)(基于友善之臂tiny4412开发板)
- 如何让百度快速收录自己的wordpress网站
- Android快速开发系列 10个常用工具类
- Spring Security 4 Custom Login Form Example(2)
- SpringMVC返回类型选择,以及Model/ModelMap/request/session取值顺序
- _beginThreadex的用法