Skip to Main Content
Oracle in a Nutshell
book

Oracle in a Nutshell

by Rick Greenwald, David C. Kreines
December 2002
Intermediate to advanced content levelIntermediate to advanced
928 pages
85h 29m
English
O'Reilly Media, Inc.
Content preview from Oracle in a Nutshell

Name

CREATE/DROP TYPE BODY

Synopsis

CREATE Syntax:

CREATE [OR REPLACE] TYPE BODY [schema.]type_name
{IS | AS} {MEMBER | STATIC} {procedure_spec | function_spec}
[{MEMBER | STATIC} {procedure_spec | function_spec} ...]
[, {MAP | ORDER} MEMBER function_spec]
END

DROP Syntax:

DROP TYPE BODY [schema.]type_name

Creates or removes a type body.

Note that there is no ALTER TYPE BODY statement. However, if you DROP a type body, the corresponding object type declaration will still exist, and you can issue a new CREATE TYPE BODY statement to create a new, and possibly different, type body.

Keywords

type_name

Name of the object type to which this type body corresponds.

MEMBER

Specifies that a function or procedure is associated with the object type that is referenced in an attribute. This class of method has an implicit first parameter referenced as SELF.

STATIC

Specifies that a function or procedure is associated with the object type that is referenced in an attribute, but has no implicit parameters.

procedure_spec

Specification for a procedure. See Chapter 9 for details.

function_spec

Specification for a function. See Chapter 9 for details.

MAP MEMBER function_spec

Specifies a member function that returns the relative position of a given instance in the ordering of all instances of the object.

ORDER MEMBER function_spec

Specifies a member function that takes an instance of an object as an explicit argument and the implicit SELF argument and returns -1, 0, or a positive integer.

Common keywords and clauses: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle Internals

Oracle Internals

Donald K. Burleson
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham
Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition

Rick Greenwald, Robert Stackowiak, Jonathan Stern

Publisher Resources

ISBN: 0596003366Errata Page