Name

EXIT

Synopsis

The EXIT command terminates a SQL*Plus session and returns to the operating system. In iSQL*Plus, you are returned to the iSQL*Plus input area without being disconnected from your database.

Syntax

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

Parameters

SUCCESS

Returns a success status. The exact value of the success status is operating system-dependent, but is often 0. SUCCESS is the default setting, and applies if no other return value is specified.

FAILURE

Returns a failure status. The value of the failure status is operating system-dependent, but is often 1.

WARNING

Returns a warning status. The exact value of the warning status is operating system-dependent.

value

Returns an arbitrary value as the status.

sub_variable

Returns the value of the specified substitution variable as the status. You can also specify SQL.SQLCODE here, to return the status of the most recently executed SQL statement.

:bind_variable

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

COMMIT

Causes SQL*Plus to automatically commit before exiting.

ROLLBACK

Causes SQL*Plus to automatically roll back any open transaction before exiting.

Get Oracle SQL*Plus: The Definitive Guide, 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.