How to fix the Oracle error PLS-00994: Cursor Variables cannot be declared as part of a package?

In this post, you’ll learn more about the Oracle ErrorPLS-00994: Cursor Variables cannot be declared as part of a package with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

PLS-00994: Cursor Variables cannot be declared as part of a package

Reason for the Error PLS-00994: Cursor Variables cannot be declared as part of a package

An attempt was made to declare a cursor variable in a package specification, which is not allowed. Although REF CURSOR types can be defined in a PL/SQL block, subprogram, or package, cursor variables can be declared only in a block or subprogram.

How to fix the Error PLS-00994: Cursor Variables cannot be declared as part of a package ?

You can fix this error in Oracle by following the below steps

Move the cursor variable declaration into a PL/SQL block or subprogram.

Tags :

Leave Your Comment