How to fix the Oracle error PLS-00396: INSERT statement’s subquery yields wrong number of columns?

In this post, you’ll learn more about the Oracle ErrorPLS-00396: INSERT statement’s subquery yields wrong number of columns with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

PLS-00396: INSERT statement’s subquery yields wrong number of columns

Reason for the Error PLS-00396: INSERT statement’s subquery yields wrong number of columns

The number of columns in an INSERT statement does not match the number of columns in a subquery select list. For example, the following statement is faulty because no corresponding column is specified for col3: INSERT INTO emp (ename, empno) SELECT col1, col2, col3 FROM …

How to fix the Error PLS-00396: INSERT statement’s subquery yields wrong number of columns ?

You can fix this error in Oracle by following the below steps

Change the number of items in the column list of the INSERT statement or the number of items in the select list so that the numbers match.

Tags :

Leave Your Comment