what is the difference between
Begin
bc_any_package_pkg.anyProcedure;
End;
/
and
EXEC bc_any_package_pkg.anyProcedure;
/
I can't find if there is any difference...
Thanks
EXECUTE
(short EXEC
) is a SQL*Plus command that basically wraps a BEGIN END
block around your one-liner:
Executes a single PL/SQL statement. The
EXECUTE
command is often useful when you want to execute a PL/SQL statement that references a stored procedure.
They really are the same when using SQL*Plus, although exec
is faster to type.
This is not standard PL/SQL, which means that if you use any other tool than SQL*Plus, there is a chance that exec
will not be recognized. It also only works with single lines.
Whereas BEGIN END
is standard and will work with any tool that interfaces with PL/SQL. Such blocks can also span more than one line.
EXEC
(or EXECUTE
in its full form) is a SQL Plus command that executes a single PL/SQL statement. So it achieves exactly the same effect as writing an anononymus block of PL/SQL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With