Infolinks

Friday 13 July 2012

EXEC[UTE] (SQL*Plus command)


EXEC[UTE] (SQL*Plus command)

Execute a PL/SQL function or procedure.

Syntax:
   EXEC statement

   EXEC [:bind_variable :=] package.procedure;

   EXEC [:bind_variable :=] package.function(parameters);
The length of the EXEC command cannot exceed the length defined by SET LINESIZE.
If the EXEC command is too long to fit on one line, use the SQL*Plus continuation character (a hyphen) -

Example

SQL> EXEC :answer := EMP_PAY.BONUS('SMITH')
Executing directly from the shell (in this case Windows):
C:\> echo execute demoProc|sqlplus demo/password

"Everyone wants results, but no one is willing to do what it takes to get them" - Dirty Harry

No comments:

Post a Comment