ORA-01422 : Exact Fetch Returns More Than Requested Number Of Rows (Doc ID 304802.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version 9.2.0.8 and later
Information in this document applies to any platform.
***Checked for relevance on 23-Jan-2013***

Symptoms

Executing a query directly or dynamically using EXECUTE IMMEDIATE and INTO clause like

SET SERVEROUTPUT ON

DECLARE 
   empnos number; 
   enames varchar2(30); 
BEGIN 
    EXECUTE IMMEDIATE 'SELECT empno, ename FROM emp' INTO empnos, enames; 
END; 


results in

ORA-01422: exact fetch returns more than requested number of rows

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms