Oracle Error PLS-00411: Number of values in aggregate and in subquery don’t match

Oracle Error Message

PLS-00411: Number of values in aggregate and in subquery don’t match

Reason for the Error

In a statement of the form aggregate = subquery, the numbers of values in the aggregate and subquery are unequal. For example, the code might look like … WHERE (10,20,30) = (SELECT empno,deptno FROM emp WHERE…);

Solution

Revise the aggregate or subquery so that the numbers of values match.