SQL> set serveroutput on
SQL> set echo on
SQL>
SQL> CREATE OR REPLACE FUNCTION mypi
2 RETURN NUMBER IS
3 BEGIN
4 NULL;
5 RETURN 3.14;
6 END mypi;
7 /
Function created.
SQL>
SQL>
SQL> BEGIN
2 DBMS_OUTPUT.PUT_LINE('value of pi is ' || mypi);
3 END;
4 /
value of pi is 3.14
PL/SQL procedure successfully completed.
SQL>