DELETE Statement Raises ORA-01422 When the Associated Returning Clause Uses an Aggregate Function in Locking Mode
(Doc ID 2592346.1)
Last updated on SEPTEMBER 25, 2019
Applies to:PL/SQL - Version 184.108.40.206 to 220.127.116.11 [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