Well, the difference is that the first formulation fails, and the second succeeds:
SQL> begin 2 dbms_output.put_line('some text'); 3 dbms_output.put('about to new_line with no parameters'); 4 dbms_output.new_line; 5 end; 6 / some text about to new_line with no parameters PL/SQL procedure successfully completed. SQL> begin 2 dbms_output.put_line('some text'); 3 dbms_output.put('about to new_line with a parameter'); 4 dbms_output.new_line(''); 5 end; 6 / dbms_output.new_line(''); * ERROR at line 4: ORA-06550: line 4, column 5: PLS-00306: wrong number or types of arguments in call to 'NEW_LINE' ORA-06550: line 4, column 5: PL/SQL: Statement ignored SQL>
change
What makes empty brackets ...
SQL> begin 2 dbms_output.put_line('some text'); 3 dbms_output.put('about to new_line with a parameter'); 4 dbms_output.new_line(); 5 end; 6 / some text about to new_line with a parameter PL/SQL procedure successfully completed. SQL>
I donβt know when Oracle actually launched this convention, but I only found out when they submitted OO stuff. Some member functions (i.e. Methods) for types will not work unless we include empty brackets, for example. XMLType getClobVal() . But parentheses are strictly optional for standard procedural calls.
source share