1. The function accepts 3 optional parameters, returns 3 digits and
CREATE OR REPLACE FUNCTION add_three_numbers
(
A number:=0, b number:=0, C number:=0
)
RETURN number is
BEGIN
RETURN A+b+c;
END;
----Call Function Add_three_numbers
----1. Position notation Call function
BEGIN
Dbms_output.put_line (Add_three_numbers (2,4,5));
END;
----2. Named notation Call function
BEGIN
Dbms_output.put_line (Add_three_numbers (b=>3, a=>4,c=>2));
END;
----3. Mixed use positional notation and named notation call functions
BEGIN
Dbms_output.put_line (Add_three_numbers (3, b=>4,c=>2));
END;
----4. Exclude representations
BEGIN
Dbms_output.put_line (Add_three_numbers (12,c=>2));
END;
----5. SQL invocation notation--Mixed notation
SELECT add_three_numbers (3, b=>4,c=>2) from DUAL;
Originating From: http://database.51cto.com/art/201005/198980.htm
Several common methods of Oracle 11g call function