Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Exiting PL/SQL
You can exit SQL*PLUS with "exit [value]" command and the exit command
will return the [value] to the OS.
$ sqlplus "/ as sysdba"
SQL> exit 10
$ echo $?
10
You can also use this for exiting from PL/SQL Put this in a file x.sql
whenever sqlerror exit 100
exec dbms_lock.sleep(30);
$ sqlplus "/ as sysdba"
SQL> @x.sql
^CBEGIN dbms_lock.sleep(30); END;
*
ERROR at line 1:
ORA-01013: user requested cancel of current operation
$ echo $?
100
regards
Srivenu
Received on Wed Jun 09 2004 - 00:58:34 CDT