11g Named and Mixed Notation in PL/SQL Subprogram Invocations

Hi All!
I was reviewing some features in Oracle and, basically, every single time I review them I find something new. Seems Oracle Databases’ features are near to infinite and we frequently find some that can really add value to our solutions.

So I decided to make a serie of posts with really quick notes about each one of them.
You can see all posts in this serie in my page of posts and some others more.

Ready? Here it goes:

Named and Mixed Notation in PL/SQL Subprogram Invocations

Prior to 11g, PL/SQL invoked from SQL had to have its parameters passed using positional notation, making it difficult to determine the meaning of parameters. Oracle 11g allows positional, named and mixed notation to be used when calling PL/SQL from SQL. Check example below:

SQL> -- Positional Notation.
SQL> SELECT add_func(10, 20) FROM dual;

add_func(10,20)
----------------
              30

SQL> -- Mixed Notation.
SQL> SELECT add_func(10, p_value_2 => 20) FROM dual;

add_func(10,P_VALUE_2=>20)
---------------------------
                         30

SQL> -- Named Notation.
SQL> SELECT add_func(p_value_1 => 10, p_value_2 => 20) FROM dual;

add_func(P_VALUE_1=>10,P_VALUE_2=>20)
--------------------------------------
                                    30

Cheers!