ORA-6504 Raised When SYS_REFCURSOR Passed to Another Procedure

(Doc ID 602865.1)

Last updated on JULY 05, 2017

Applies to:

PL/SQL - Version: 11.1.0.6.0
This problem can occur on any platform.

Symptoms

There are two procedures p1 and p2 which take in a sys_refcursor variable as in out parameters.
One of the procedures (p1) does nothing but simply call the other procedure (p2) which opens the refcursor with a select statement. When we call p2 directly it works as expected whereas calling p1 fails
with following error.


ORA-06504: PL/SQL: Return types of Result Set variables or query do not match

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