Updated on 2025-02-27 GMT+08:00

ALTER PACKAGE

Description

Alters the attributes of a package.

Precautions

Currently, only users with the ALTER PACKAGE OWNER permission can run this command. By default, system administrators have the permission. The restrictions are as follows:
  • The current user must be the owner of the package or a system administrator and a member of the new owner role.

Syntax

  • Alter the owner of a package.
    ALTER PACKAGE package_name OWNER TO new_owner;

Parameters

  • package_name

    Specifies the name of the package to be modified.

    Value range: an existing package name. Only one package can be modified at a time.

  • new_owner

    Specifies the new owner of a package. To change the owner of a package, the new owner must have the CREATE permission on the schema to which the package belongs.

    Value range: an existing user role.

Examples

For details, see CREATE PACKAGE.

Helpful Links

CREATE PACKAGE and DROP PACKAGE