Function in PL/SQL to return addition of two numbers



******************************************
--FUNCTION TO RETURN ADDITION

CREATE OR REPLACE FUNCTION ADD1(A NUMBER,B NUMBER)
RETURN NUMBER IS
BEGIN
   RETURN A+B;
END;

***************************************************
TO EXEXUTE THE FUNCTION

SELECT ADD1(10,20) FROM DUAL;

EXECUTE DBMS_OUTPUT.PUT_LINE(ADD1(10,-10)); 
Previous
Next Post »