CREATE PACKAGE v16
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 you include a schema name, then the package is created in the specified schema. Otherwise it's created in the current schema. The name of the new package can't match any existing package in the same schema unless you want to update the definition of an existing package. In that 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 to use the privileges of the package owner (
DEFINER) or the privileges of the current user executing a program in the package (
CURRENT_USER) to determine whether 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 types 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 can't modify the database and always reaches the same result when given the same argument values. It doesn't perform database lookups and uses only information directly present in its argument list. If you include this clause, you can immediately replace any call of the procedure with all-constant arguments 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: