ORA-01789:query block has incorrect number of result columns
来源:互联网 发布:淘宝哪有弩卖 编辑:程序博客网 时间:2024/06/02 09:25
在写一个8张表一起union all 的SQL时,遇到了ORA-01789:query block has incorrect number of result columns
顾名思义,查询块的列数目不相等。
下面的SQL,查询时就会报ORA-01789错误
select empno, ename, job, sal from emp t where t.deptno = 20unionselect empno, ename, sal from emp t where t.deptno = 30
补上第二个块的列,补齐了就可以正常查询了。
select empno, ename, job, sal from emp t where t.deptno = 20unionselect empno, ename, 'job', sal from emp t where t.deptno = 30
0 0
- ora-01789:query block has incorrect number of result columns
- ora-01789:query block has incorrect number of result columns
- ORA-01789:query block has incorrect number of result columns
- ORA-01789: query block has incorrect number of result columns
- Caused exception message is: ORA-01789: query block has incorrect number of result columns
- ora-01789:query block has incorrect number of result columns 错误
- Caused exception message is: ORA-01789: query block has incorrect number of result columns
- 解决java.sql.SQLException: ORA-01789: query block has incorrect number of result columns
- Caused exception message is: ORA-01789: query block has incorrect number of result columns
- ORA-27063: number of bytes read/written is incorrect
- Oracle 12C ORA-01792: maximum number of columns in a table or view is 1000
- Incorrect number of FETCH variables
- ORA-27063: number of bytes read/written is incorrect之二
- Incorrect number of tokens found parsing file
- 【SQL0001】Query from the result of another query
- ORA-14039: partitioning columns must form a subset of key columns of a UNIQUE index
- ORA-14039: partitioning columns must form a subset of key columns of a UNIQUE index SYS
- The used SELECT statements have a different number of columns
- java-基于Socker服务完成UDP协议
- iOS 中KVC、KVO、NSNotification、delegate 总结及区别
- 20160130.CCPP体系详解(0009天)
- IP数据报的首部
- Windows作业(Job)
- ORA-01789:query block has incorrect number of result columns
- Linux配置IP地址的方法
- 常用的C#代码(每日更新)
- 写博客初衷
- 使用navicat for oracle 连接oracle服务器
- LeetCode Reverse Words in a String
- [bzoj3757]苹果树
- 上传AppStore会碰到:Failed to locate or generate matching signing assets(Missing iOS Distribution signing)
- bzoj 3238 差异