There are two way to execute a stored procedure.
From the SQL prompt, write EXECUTE or EXEC followed by procedure_name.
EXECUTE or [EXEC] procedure_name;
Simply use the procedure name
procedure_name;
In PL/SQL, you can execute a stored procedure using the EXECUTE
statement or its shorthand notation EXEC
. Here is the syntax:
EXECUTE procedure_name(parameters);
or
EXEC procedure_name(parameters);
For example, if you have a stored procedure named my_procedure
that takes two parameters param1
and param2
, you can execute it as follows:
EXECUTE my_procedure('value1', 'value2');
or
EXEC my_procedure('value1', 'value2');
Make sure to replace 'value1'
and 'value2'
with the actual values you want to pass as parameters to the stored procedure.