RelationalDBDesign RelationalDBDesign


Creating Packages   «Prev 

Package specification Syntax

CREATE OR REPLACE PACKAGE GET_MONTHEND_DATA IS
PROCEDURE CALC_PROFIT
(I_YEAR IN NUMBER, I_MONTH IN NUMBER, O_PROFIT OUT NUMBER);
FUNCTION CALC_DIVIDENDS
(I_CUTOFF_DATE IN DATE) RETURN NUMBER;
END GET_MONTHEND_DATA;

Location 1 The OR REPLACE phrase is optional. Include it when you want to replace the current version of the package when you run the command.

Location 2

You must specify either IS or AS, whichever you prefer.

Location 3

Each public sub-program is defined here with the syntax{PROCEDURE | FUNCTION}subprogram_name [(parameter_specs)]. Separate them with semicolons.