CREATE PACKAGE v14
CREATE PACKAGE -- define a new package specification.
CREATE PACKAGE defines a new package specification.
CREATE OR REPLACE PACKAGE either creates a new package specification or replaces an existing specification.
If a schema name is included, then the package is created in the specified schema. Otherwise it is created in the current schema. The name of the new package must not match any existing package in the same schema unless the intent is to update the definition of an existing package, in which case use
CREATE OR REPLACE PACKAGE.
The user that creates the procedure becomes the owner of the package.
The name (optionally schema-qualified) of the package to create.
DEFINER | CURRENT_USER
Specifies whether the privileges of the package owner (
DEFINER) or the privileges of the current user executing a program in the package (
CURRENT_USER) are to be used to determine whether or not access is allowed to database objects referenced in the package.
DEFINER is the default.
A public variable, type, cursor, or
REF CURSOR declaration.
The name of a public procedure.
The name of an argument.
IN | IN OUT | OUT
The argument mode.
The data type(s) of the program’s arguments.
Default value of an input argument.
The name of a public function.
The return data type.
DETERMINISTIC is a synonym for
DETERMINISTIC procedure cannot modify the database and always reaches the same result when given the same argument values; it does not do database lookups or otherwise use information not directly present in its argument list. If you include this clause, any call of the procedure with all-constant arguments can be immediately replaced with the procedure value.
RNDS | RNPS | TRUST | WNDS | WNPS
The keywords are accepted for compatibility and ignored.
The package specification,
empinfo, contains three public components - a public variable, a public procedure, and a public function.