Search results
The CREATE PACKAGE statement creates or replaces the specification for a stored package, which is an encapsulated collection of related procedures, functions, and other program objects stored as a unit in the database.
- SQL Statements for Stored Pl/Sql Units
Each of these CREATE statements has an optional OR REPLACE...
- Create Library Statement
For instructions for creating an operating-system shared...
- Description of The Illustration Create_Package.Eps
CREATE [ OR REPLACE ] [ EDITIONABLE | NONEDITIONABLE ]...
- Description of The Illustration Package_Function_Declaration.Eps
function_heading [ accessible_by_clause |...
- Description of Illustration Package_Procedure_Declaration
procedure_heading [accessible_by_clause] ; Copyright © 1996,...
- Description of The Illustration Plsql_Package_Source
[ schema. ] package_name [ sharing_clause ] [ {...
- Description of The Illustration Package_Item_List
{ type_definition | cursor_declaration | item_declaration |...
- Create Package
Use the CREATE PACKAGE statement to create the specification...
- SQL Statements for Stored Pl/Sql Units
Use the CREATE PACKAGE statement to create the specification for a stored package, which is an encapsulated collection of related procedures, functions, and other program objects stored together in the database.
The CREATE PACKAGE statement is used to define a new package specification. If you want to rebuild existing package you can use the REPLACE keyword instead of the CREATE keyword. In the package specification, you can define new types, declare global variables, types, objects, exceptions, cursors, procedures, and functions.
What is a PL/SQL package. In PL/SQL, a package is a schema object that contains definitions for a group of related functionalities. A package includes variables, constants, cursors, exceptions, procedures, functions, and subprograms. It is compiled and stored in the Oracle Database.
This tutorial shows you step by step how to create a PL/SQL package specification by using the CREATE PACKAGE statement.
To create a package in Oracle PL/SQL, you first create the specification using the CREATE PACKAGE statement, and then you create the body using the CREATE PACKAGE BODY statement. Here’s an example: CREATE OR REPLACE PACKAGE my_package. IS. PROCEDURE my_procedure(p_param1 NUMBER, p_param2 VARCHAR2); FUNCTION my_function(p_param1 DATE) RETURN NUMBER;
To create a package body, you use the CREATE PACKAGE BODY as shown below: CREATE [OR REPLACE] PACKAGE BODY [schema_name.]<package_name> IS | AS . declarations. implementations; [BEGIN EXCEPTION] END [<package_name>]; Code language: SQL (Structured Query Language) (sql) In this syntax: