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.
- Open the Toad for Oracle.
- Connect to the Database.
- Click on the menu Database > Schema Browser.
- In the Schema Browser, click on the Procedures Tab or drop-down menu.
- List of Procedures will be displayed. Then select the Procedure you want to execute and do the right click on it.
- From the shortcut menu, select Execute Procedure to execute the procedure.
- A window will pop-up as shown below.
- 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.
- 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;
PL/SQL procedure successfully completed.