User Tools

Site Tools


Sidebar

HPL/SQL is included to Apache Hive since version 2.0

create-package

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== CREATE PACKAGE Statement ====== CREATE PACKAGE statement allows you to define a collection of related variables, procedures and functions. **Syntax** Package specification: <code language=sql> [ALTER | CREATE [OR REPLACE] | REPLACE] PACKAGE package_name AS | IS package_spec END package_spec: variable declaration | function declaration | procedure declaration </code> **Example**: Define a package and then call its memebers: <code language=sql> -- Package specification create or replace package users as total_count int := 0; function get_count() return int; procedure add_user(name varchar(100)); end; </code> **Compatibility:** Oracle **Version**: HPL/SQL 0.3.13 See also: * [[udf-sproc|User-Defined Functions and Stored Procedures]] * [[call|CALL]] * [[create-function|CREATE FUNCTION]] * [[create-procedure|CREATE PROCEDURE]] * [[include|INCLUDE]]