aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

PLS-00398: wrong number of columns in UNION, INTERSECT, or MINUS expression

PLS-00398: wrong number of columns in UNION, INTERSECT, or MINUS expression
Cause: The SELECT clauses to the left and right of a UNION, INTERSECT, or MINUS expression do not select the same number of columns. For example, the following statement is faulty because the select lists do not contain the same number of items: CURSOR my_cur IS SELECT ename FROM emp INTERSECT SELECT ename, empno FROM emp;
Action: Change the select lists so that they contain the same number of items.

请先 登录 后评论

1 个回答

小智
PLS-00398:UNION,INTERSECT或MINUS表达式中的列数错误,
.原因: UNION,INTERSECT或MINUS表达式左侧和右侧的SELECT子句不选择相同数量的列。例如,以下语句是错误的,因为选择列表不包含相同数量的项目:CURSOR my_cur IS SELECT ename FROM emp INTERSECT SELECT ename,empno FROM emp;,
.操作:更改选择列表,使其包含相同数量的项目。,
.
请先 登录 后评论