-------------------------------------- IN DECLARE BLOCK CREATE NEW PROC ---------------------------------------------
DECLARE
l_id NUMBER;
l_id1 NUMBER;
PROCEDURE p1
IS
l_id NUMBER;
BEGIN
l_id := 100;
DBMS_OUTPUT.put_line ('PRO ID VALUE ==> ' || l_id);
END p1;
BEGIN
l_id := 200;
l_id1 := 300;
DBMS_OUTPUT.put_line( 'VALUE ID VALUE ==> '
|| l_id
|| CHR (10)
|| 'SECOND ID VALUE ==> '
|| l_id1);
p1;
END;
-------------------------------------- IN DECLARE BLOCK CREATE NEW PROC AND FUNC ---------------------------------------------
DECLARE
l_id NUMBER;
l_id1 NUMBER;
l_fun_id NUMBER;
PROCEDURE p1
IS
l_proc_id NUMBER;
BEGIN
l_proc_id := 100;
DBMS_OUTPUT.put_line ('PRO ID VALUE ==> ' || l_proc_id);
END p1;
FUNCTION f1
RETURN NUMBER
IS
l_fun_id NUMBER;
BEGIN
l_fun_id := 1000;
DBMS_OUTPUT.put_line ('FUUNC ID VALUE ==> ' || l_fun_id);
RETURN l_fun_id;
END f1;
BEGIN
l_id := 200;
l_id1 := 300;
DBMS_OUTPUT.put_line( 'VALUE ID VALUE ==> '
|| l_id
|| CHR (10)
|| 'SECOND ID VALUE ==> '
|| l_id1);
p1;
l_fun_id := f1;
DBMS_OUTPUT.put_line ('THIRD ID VALUE ==> ' || l_fun_id);
END;
No comments:
Post a Comment