Sunday, 9 June 2013

PL/SQL program for defining and calling simple function

create or replace function Addition(x number,y number)
return number is
z number;
begin
z:=x+y;
return z;
end;
---------------------------------------
declare
z number;
begin
z:=Addition(5,2);
dbms_output.put_line('The Addition:-'||z);
end;


Output:
The Addition:-7

PL/SQL procedure successfully completed.

No comments:

Post a Comment