-------------------------------------- IN DECLARE BLOCK CREATE NEW PROC AND FUNC AND CREATE FUN WITHIN PROC ---------------------------------------------
DECLARE
l_id NUMBER;
l_id1 NUMBER;
l_fun_id NUMBER;
PROCEDURE p1
IS
l_proc_id NUMBER;
l_proc_FUNC_id NUMBER;
FUNCTION PRO_F
RETURN NUMBER
IS
l_PRO_fun_id NUMBER;
BEGIN
l_PRO_fun_id := 1111;
DBMS_OUTPUT.put_line ('FUUNC ID VALUE ==> ' || l_PRO_fun_id);
RETURN l_PRO_fun_id;
END PRO_F;
BEGIN
l_proc_id := 100;
l_proc_FUNC_id:= PRO_F;
DBMS_OUTPUT.put_line ('PRO ID VALUE ==> ' || l_proc_id||CHR(9)|| 'PRO FUNCTION ID VALUE ==> '||l_proc_FUNC_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