How to fix the Oracle error PLS-00642: local collection types not allowed in SQL statements?

In this post, you’ll learn more about the Oracle ErrorPLS-00642: local collection types not allowed in SQL statements with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

PLS-00642: local collection types not allowed in SQL statements

Reason for the Error PLS-00642: local collection types not allowed in SQL statements

A locally-defined (i.e. not schema level) collection type was used in a SQL statement. The type must be defined in a schema to be accepted in a SQL statement.

How to fix the Error PLS-00642: local collection types not allowed in SQL statements ?

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

Define the collection type in your schema, not inside a PL/SQL subprogram.

Tags :

Leave Your Comment