EXIT Statement [Interactive SQL]

Leaves Interactive SQL.

Quick Links:

Go to Examples

Go to Usage

Go to Standards

Go to Permissions

Syntax

EXIT | QUIT | BYE } [ return-code ]

return-code
   number | connection-variable

Examples

(back to top)

Usage

(back to top)

Closes the Interactive SQL window, if you are running Interactive SQL as a windowed program, or terminates Interactive SQL altogether when run in command-prompt (batch) mode. In both cases, the database connection is also closed. Before closing the database connection, Interactive SQL automatically executes a COMMIT statement, if the COMMIT_ON_EXIT option is set to ON. If this option is set to OFF, Interactive SQL performs an implicit ROLLBACK. By default, the COMMIT_ON_EXIT option is set to ON.

The optional return code can be used in batch files to indicate success or failure of the commands in an Interactive SQL command file. The default return code is 0.

Side Effects

Standards

(back to top)

  • SQL—Vendor extension to ISO/ANSI SQL grammar.
  • SAP Sybase Database product—Not applicable by Adaptive Server.

Permissions

(back to top)

None

Related reference
SET OPTION Statement