Example of forward declaration in package :
CREATE OR REPLACE PACKAGE Functions_exmple_package
AS
PROCEDURE create_drop_seq
( p_CountryCode IN country.country_code TYPE
p_state IN p_type.p_type TYPE);
END Functions_exmple_package;
/
CREATE OR REPLACE PACKAGE BODY Functions_exmple_package
AS
/*Forward declaration for procedure as this is private to package and defined later*/
PROCEDURE create_drop_seq
( p_CountryCode IN country.country_code TYPE
p_state IN p_type.p_type TYPE
);
PROCEDURE create_drop_seq
( p_CountryCode IN country.country_code TYPE
p_state IN p_type.p_type TYPE)
AS
BEGIN
create_drop_seq(p_CountryCode cur_LegVeh);
/*procedure is called here only because it is forward declared (not defined till now)*/
END create_drop_seq;
PROCEDURE create_drop_seq ( p_CountryCode IN
country.country_code TYPE
p_state IN p_type.p_type TYPE)
AS
BEGIN
............................/*Procedure defined here onwards....*/
END create_drop_seq;
CREATE OR REPLACE PACKAGE Functions_exmple_package
AS
PROCEDURE create_drop_seq
( p_CountryCode IN country.country_code TYPE
p_state IN p_type.p_type TYPE);
END Functions_exmple_package;
/
CREATE OR REPLACE PACKAGE BODY Functions_exmple_package
AS
/*Forward declaration for procedure as this is private to package and defined later*/
PROCEDURE create_drop_seq
( p_CountryCode IN country.country_code TYPE
p_state IN p_type.p_type TYPE
);
PROCEDURE create_drop_seq
( p_CountryCode IN country.country_code TYPE
p_state IN p_type.p_type TYPE)
AS
BEGIN
create_drop_seq(p_CountryCode cur_LegVeh);
/*procedure is called here only because it is forward declared (not defined till now)*/
END create_drop_seq;
PROCEDURE create_drop_seq ( p_CountryCode IN
country.country_code TYPE
p_state IN p_type.p_type TYPE)
AS
BEGIN
............................/*Procedure defined here onwards....*/
END create_drop_seq;
No comments:
Post a Comment
Please Provide your feedback here