O'Reilly logo

Oracle in a Nutshell by David C. Kreines, Rick Greenwald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

CREATE/ALTER/DROP TYPE

Synopsis

CREATE Incomplete Syntax:

CREATE [OR REPLACE] TYPE [schema.]type_name

CREATE Object Syntax:

CREATE [OR REPLACE] TYPE [schema.]type_name
[AUTHID {CURRENT_USER | DEFINER}]
{IS | AS} OBJECT (attribute datatype[, attribute datatype...]),
  {MEMBER | STATIC} {procedure_spec | function_spec}
  [,PRAGMA RESTRICT_REFERENCES ({method_name | DEFAULT},
  {RNDS|WNDS | RNPS | WNPS | TRUST}
   [,{RNDS | WNDS | RNPS | WNPS | TRUST}...] [,PRAGMA...]
  {MEMBER | STATIC} {procedure_spec | function_spec}
  [,PRAGMA RESTRICT_REFERENCES ({method_name | DEFAULT},
  {RNDS | WNDS | RNPS | WNPS | TRUST}
   [,{RNDS | WNDS | RNPS | WNPS | TRUST}...] [,PRAGMA...] ...]
  [, {MAP | ORDER} MEMBER function_spec]

Create VARRAY Syntax:

CREATE [OR REPLACE] TYPE [schema.]type_name
{IS | AS} {VARRAY | VARYING ARRAY} (limit) OF datatype

CREATE Nested Table Syntax:

CREATE [OR REPLACE] TYPE [schema.]type_name
{IS | AS} TABLE OF datatype

ALTER Syntax:

ALTER TYPE [schema.]type_name 
{ COMPILE [DEBUG] [SPECIFICATION | BODY] [REUSE SETTINGS]
| REPLACE [AUTHID {CURRENT_USER | DEFINER}]
  AS OBJECT (attribute 
                     datatype[, attribute 
                     datatype...]),
 {MEMBER | STATIC} {procedure_spec | function_spec}
  [,PRAGMA RESTRICT_REFERENCES ({method_name | DEFAULT},
  {RNDS | WNDS | RNPS | WNPS | TRUST}]
   [,{RNDS | WNDS | RNPS | WNPS | TRUST}...]),PRAGMA...]
 {MEMBER | STATIC} {procedure_spec | function_spec}
  [,PRAGMA RESTRICT_REFERENCES ({method_name | DEFAULT}, {RNDS | WNDS | RNPS | WNPS | TRUST} [,{RNDS | WNDS | RNPS | WNPS | TRUST}...)[,PRAGMA...] ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required