[Err] 1222 - The used SELECT statements have a different number of columns
来源:互联网 发布:python 卷积 编辑:程序博客网 时间:2024/05/22 15:46
1、错误描述
[Err] 1222 - The used SELECT statements have a different number of columns
[SQL]SELECT t.id,t.eage,t.ename,t.esex FROM emp tUNION ALLSELECT s.age,s.`name`,s.id FROM t_stu_info s;[Err] 1222 - The used SELECT statements have a different number of columns
2、错误原因
SELECT t.id,t.eage,t.ename,t.esex FROM emp tUNION ALLSELECT s.age,s.`name`,s.id FROM t_stu_info s;两个查询SQL语句用union all连接,但是字段个数不一致,导致出错
3、解决办法
(1)根据需求,下面一个select添加个字段
(2)第一个select中删除一个字段
2 0
- [Err] 1222 - The used SELECT statements have a different number of columns
- 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 错误解决
- UNION关键字报错:ERROR 1222 (21000): 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?
- What are the different kinds of parsers used in XML?
- A. The number of positions
- b is not in the spans of the columns of the martix A
- A string s is LUCKY if and only if the number of different characters in s is a fibonacci number. Gi
- MySQL解决[Err] 1206 - The total number of locks exceeds the lock table size问题
- Oracle 12C ORA-01792: maximum number of columns in a table or view is 1000
- calculate the square of a number
- CodeForces-124A-The number of positions
- CodeForces-124A-The number of positions
- 划分数
- 八数码的八重境界
- 20151116 密码文件
- CSS定位的兼容性问题
- [TwistedFate]UIActionSheet
- [Err] 1222 - The used SELECT statements have a different number of columns
- 【数据结构与算法分析】2.3 求X的N次幂
- Clustering by Passing Messages Between Data Points
- java正则表达式
- KMP算法
- Gradle学习
- C#学习第三天
- 最新FreeRtos(版本8.0)上手指南
- python BeautifulSoup 正则匹配糗事百科并保存到本地