My Oracle Support Banner

PLS-307 With Subtype With User-defined Constructor (Doc ID 399296.1)

Last updated on OCTOBER 23, 2019

Applies to:

PL/SQL - Version 9.2.0.7 and later
Information in this document applies to any platform.

Symptoms

Oracle Database implicitly defines a constructor method for each user-defined type that is created. A constructor is a system-supplied procedure that is used in SQL statements or in PL/SQL code to construct an instance of the type value. The name of the constructor method is the same as the name of the user-defined type.

When a user-defined constructor is defined in a subtype with the same name and parameters as the implicit constructor the following error occurs because the PLSQL engine cannot determine which constructor to call and will return the following error:

PLSQL subtype fails with PLS-00307: too many declarations of '%s' match this call


Cause

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
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.