Defining Your Own Datatypes : Subtype Custom Type « PL SQL Data Types « Oracle PL/SQL Tutorial






You can create PL/SQL datatypes in the declaration portions of procedures, functions, root anonymous blocks, package bodies, and package specs.

You create SQL types by using a DDL operation with the following syntax:

type newType is definitionOfTheType;

The basic syntax is shown here:

declare
   type newType is definitionOfTheType;
21.36.Subtype Custom Type
21.36.1.Defining Your Own Datatypes
21.36.2.Keeping Code Consistent with User-Defined Subtypes