Exec: execute a procedure : exec « Stored Procedure Function « Oracle PL / SQL






Exec: execute a procedure


SQL>
SQL> set serverout on;
SQL>
SQL> -- Displaying "Hello World!" to the screen.
SQL>
SQL>      CREATE OR REPLACE PROCEDURE HELLO AS
  2       BEGIN
  3            DBMS_OUTPUT.PUT_LINE('Hello World! ' ||
  4                 TO_CHAR(SYSDATE,'MM-DD-YY HH:MI:SS AM'));
  5       END;
  6  /
SQL>
SQL> exec HELLO();
Hello World! 09-09-06 07:23:06 PM
SQL>
           
       








Related examples in the same category

1.Use EXEC to execute a Stored Procedure
2.Procedure without parameters