2.3.23 CREATE PACKAGE

Table of Contents Previous Next


2 The SQL Language : 2.3 SQL Commands : 2.3.23 CREATE PACKAGE

CREATE PACKAGE -- define a new package specification
[ declaration; ] [, ...]
[ (argname [ IN | IN OUT | OUT ] argtype [ DEFAULT value ]
FUNCTION func_name
[ (argname [ IN | IN OUT | OUT ] argtype [ DEFAULT value ]
RETURN rettype [ DETERMINISTIC ];
END [ name ]
CREATE PACKAGE defines a new package specification. CREATE OR REPLACE PACKAGE will either create a new package specification, or replace an existing specification.
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.
DETERMINISTIC is a synonym for IMMUTABLE. A 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.
The package specification, empinfo, contains three public components - a public variable, a public procedure, and a public function.

2 The SQL Language : 2.3 SQL Commands : 2.3.23 CREATE PACKAGE

Table of Contents Previous Next