How to fix the Oracle error PLS-00398: wrong number of columns in UNION, INTERSECT, or MINUS expression?
In this post, you’ll learn more about the Oracle ErrorPLS-00398: wrong number of columns in UNION, INTERSECT, or MINUS expression with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
PLS-00398: wrong number of columns in UNION, INTERSECT, or MINUS expression
Reason for the Error PLS-00398: wrong number of columns in UNION, INTERSECT, or MINUS expression
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;
How to fix the Error PLS-00398: wrong number of columns in UNION, INTERSECT, or MINUS expression ?
You can fix this error in Oracle by following the below steps
Change the select lists so that they contain the same number of items.
Leave Your Comment