Type bodies are defined using PL/SQL. Therefore, this section provides some general information but refers to Oracle Database PL/SQL Language Reference for details of syntax and semantics.
BODY to define or implement the member methods defined in the object type specification. You create object types with the
TYPE and the
BODY statements. The
TYPE statement specifies the name of the object type, its attributes, methods, and other properties. The
BODY statement contains the code for the methods that implement the type.
For each method specified in an object type specification for which you did not specify the
call_spec, you must specify a corresponding method body in the object type body.
Note:If you create a SQLJ object type, then specify it as a Java class.
Every member declaration in the
TYPE specification for object types must have a corresponding construct in the
To create or replace a type body in your own schema, you must have the
TYPE or the
TYPE system privilege. To create an object type in another user's schema, you must have the
TYPE system privilege. To replace an object type in another user's schema, you must have the
TYPE system privilege.
Type bodies are defined using PL/SQL. Therefore, the syntax diagram in this book shows only the SQL keywords. Refer to Oracle Database PL/SQL Language Reference for the PL/SQL syntax, semantics, and examples.
plsql_source: See Oracle Database PL/SQL Language Reference.)
REPLACE to re-create the type body if it already exists. Use this clause to change the definition of an existing type body without first dropping it.
Users previously granted privileges on the re-created object type body can use and reference the object type body without being granted privileges again.
You can use this clause to add new member subprogram definitions to specifications added with the
See Oracle Database PL/SQL Language Reference for the syntax and semantics of the