An example of Oracle package and procedure definitions.
CREATE or REPLACE PACKAGE dco_rpc_pkg AS TYPE rpc_ex_cur IS REF CURSOR RETURN example_table%ROWTYPE; PROCEDURE rset_rpc_ex (c1 IN date, c2 IN date, a IN OUT rpc_ex_cur); PROCEDURE input_rpc_ex (in_id IN number); PROCEDURE output_rpc_ex (c1 IN OUT number, c2 OUT varchar); END dco_rpc_pkg; CREATE or REPLACE PACKAGE BODY dco_rpc_pkg AS PROCEDURE rset_rpc_ex (c1 IN date, c2 IN date, a IN OUT rpc_ex_cur) IS BEGIN OPEN a FOR select * from example_table where birthdate between c1 and c2; END; PROCEDURE input_rpc_ex (in_id IN number) IS BEGIN delete example_table where id_num = in_id; END; PROCEDURE output_rpc_ex (c1 IN OUT number, c2 OUT varchar) IS BEGIN select name into c2 from example_table where id_num = c1; END; END dco_rpc_pkg;