How to fix the Oracle error SQL-02112: SELECT..INTO returns too many rows?

In this post, you’ll learn more about the Oracle ErrorSQL-02112: SELECT..INTO returns too many rows with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

SQL-02112: SELECT..INTO returns too many rows

Reason for the Error SQL-02112: SELECT..INTO returns too many rows

Cause: A SELECT…INTO statement returned more rows than can be stored in the host variable provided.

How to fix the Error SQL-02112: SELECT..INTO returns too many rows ?

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

Action: There are 3 possible solutions:

1. Use the precompiler option select_error=no.

2. Declare a host variable with a larger array dimension.

3. Declare a cursor or cursor variable for the select statement.

Tags :

Leave Your Comment