Oracle PL/SQL Tutorial/PL SQL Data Types/Subtype Custom Type

Материал из SQL эксперт
Версия от 13:07, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Defining Your Own Datatypes

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:



   <source lang="sql">

type newType is definitionOfTheType;</source>


Keeping Code Consistent with User-Defined Subtypes

   <source lang="sql">

declare

 subtype newSubtype is standardType [NOT NULL];</source>