Oracle® TimesTen In-Memory Database SQL Reference Release 11.2.1 Part Number E13070-03 |
|
|
View PDF |
The CREATE PACKAGE statement creates the specification for a standalone package, which is an encapsulated collection of related procedures, functions, and other program objects stored together in your database. The package specification declares these objects. The package body defines these objects.
Required privilege
CREATE PROCEDURE (if owner) or CREATE ANY PROCEDURE (if not owner)
CREATE [OR REPLACE] PACKAGE [Owner.]PackageName [invoker_rights_clause] {IS|AS} plsql_package_spec
The syntax for the invoker_rights_clause:
AUTHID {CURRENT_USER | DEFINER}
Parameters
The CREATE PACKAGE statement has the parameters:
Parameter | Description |
---|---|
OR REPLACE |
Specify OR REPLACE to recreate the package specification if it already exists. Use this clause to change the specification of an existing package without dropping and recreating the package. When you change a package specification, TimesTen recompiles it. |
PackageName |
Name of the package. |
invoker_rights_clause |
Lets you specify whether the package executes with the privileges and in the database of the user who owns it or with the privileges and in the database of the CURRENT_USER .
Specify Specify
For more information, see Oracle Database SQL Language Reference. |
IS|AS |
Specify either IS or AS to declare the body of the function. |
plsql_package_spec |
Specifies the package specification. Can include type definitions, cursor declarations, variable declarations, constant declarations, exception declarations and PL/SQL subprogram declarations. |
Description
The CREATE PACKAGE statement is not replicated.
When you create or replace a package, the privileges granted on the package remain the same. If you drop and re-create the object, the object privileges that were granted on the original object are revoked.
See also
Oracle Database PL/SQL Language Reference and Oracle Database SQL Language Reference