declare
2 x number(3);
3 y number(3);
4 z number(3);
5 procedure pp(m IN number , n IN number , o OUT number) is
6 begin
7 o :=m+n;
8 end;
9 begin
10 x :=6;
11 y:=8;
12 pp(x,y,z);
13 DBMS_OUTPUT.PUT_LINE(z);
14 end;
15 /
14
PL/SQL procedure successfully completed.
FUNCTIONAL PL/SQL:
declare
2 a number(3);
3 b number(3);
4 c number(3);
5 function findlarge( m IN number , n IN number)Return number is
6 d number;
7 begin
8 if m > n then
9 d :=m;
10 else
11 d := n;
12 end if;
13 Return d;
14 end ;
15 begin
16 a :=5;
17 b :=9;
18 c :=findLarge(a,b);
19 DBMS_OUTPUT.PUT_LINE('large one'|| c);
20 end ;
21 /
large one9
PL/SQL procedure successfully completed.