My Oracle Support Banner

DELETE Statement Raises ORA-01422 When the Associated Returning Clause Uses an Aggregate Function in Locking Mode (Doc ID 2592346.1)

Last updated on APRIL 17, 2023

Applies to:

PL/SQL - Version to [Release 11.2 to 12.2]
Information in this document applies to any platform.


A DELETE statement in a PL/SQL block unexpectedly raises "ORA-01422: exact fetch returns more than requested number of rows" when the associated RETURNING clause invokes an aggregate function in locking mode. The error is not observed when the RETURNING clause does not involve an aggregate function. If the same DELETE statement is executed outside the PL/SQL block i.e. as a standalone SQL statement, it raises "ORA-24369: required callbacks not registered for one or more bind handles".

For example, connect to the database using two SQL Plus sessions.

Session 1 :-


No changes occurred. The issue can be observed across the RDBMS versions from 11g to 19c.


To view full details, sign in with your My Oracle Support account.

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

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.