Press "Enter" to skip to content

Learn How to Execute a Procedure in Toad For Oracle

In this tutorial, you will learn how to execute a procedure in Toad for Oracle.

Follow these steps to execute a procedure in Toad for Oracle.

  1. Open the Toad for Oracle.
  2. Connect to the Database.
  3. Click on the menu Database > Schema Browser.
  4. In the Schema Browser, click on the Procedures Tab or drop-down menu.
  5. List of Procedures will be displayed. Then select the Procedure you want to execute and do the right click on it.
  6. From the shortcut menu, select Execute Procedure to execute the procedure.
  7. A window will pop-up as shown below.

execute stored procedure in toad

  1. Set the parameter’s value in the arguments section or set directly into the code section below. For example, for parameter P_EMPNO specify a number value instead of NULL.
  2. Then click on OK to execute. You can also copy the code displayed in Code section of the window and paste it into the SQL editor and execute.

Below is the example how you can execute the procedure copied from the above window in Toad SQL editor. There you can see the output also using SET SERVEROUTPUT ON command.

SET SERVEROUTPUT ON;
DECLARE 
P_EMPNO NUMBER;

BEGIN 
P_EMPNO := NULL;

VINISH.PEMP ( P_EMPNO );
COMMIT; 
END;

Output:

PL/SQL procedure successfully completed.

See also: