December 2010
Intermediate to advanced
451 pages
11h 16m
English
You want to execute a stored procedure from SQL*Plus.
Open SQL*Plus, and connect to the database schema that contains the procedure you are interested in executing. Execute the procedure by issuing the following command:
EXEC procedure_name([param1, param2,...]);
For instance, to execute the procedure that was created in Recipe 4-3, you would issue the following command:
EXEC increase_wage(198, .03, 5000);
This would invoke the INCREASE_WAGE procedure, passing three parameters: EMPLOYEE_ID, a percentage of increase, and an upper salary bound.
You can also execute a stored procedure by creating a simple anonymous block that contains the procedure call, as depicted in the following code:
Read now
Unlock full access