Name

EXIT

Synopsis

EXIT [SUCCESS | FAILURE | WARNING |
     value | user_variable | :bind_variable]
     [COMMIT | ROLLBACK]

The EXIT command terminates a SQL*Plus session and returns to the operating system. For example:

EXIT
EXIT SUCCESS
EXIT FAILURE ROLLBACK

Parameters

SUCCESS

Returns a success status. This is the default.

FAILURE

Returns a failure status.

WARNING

Returns a warning status.

value

Returns an arbitrary value as the status.

user_variable

Returns the value of the specified user variable as the status. Use SQL.SQLCODE to return the error from the most recent SQL query.

:bind_variable

Returns the value of the specified bind variable as the status.

COMMIT

Commits before exiting. This is the default.

ROLLBACK

Rolls back any open transaction before exiting.

Get Oracle SQL Plus Pocket Reference, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.