Skip to content
Advertisement

PLS-00225 subprogram or cursor ” reference is out of scope when try to read column names

I’m trying to return the column names and the value as a pair key/value like this:

column_name | column_value
dep_id | 1
dep_name | ‘Test’
dep_create_date | ’08-25-2021′

When I execute this block, I got the following error message:

Error report – ORA-06550: line 6, column 22: PLS-00225: subprogram or cursor ‘C_DEPT’ reference is out of scope ORA-06550: line 6, column 5:

What I’m doing wrong?

Advertisement

Answer

Use the DBMS_SQL package:

Which outputs:

db<>fiddle here

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement