DISCONNECT Statement [Interactive SQL]

Drops a connection with the database.

Syntax

DISCONNECT [ { connection-name | CURRENT | ALL } ]

Parameters

Examples

Usage

The DISCONNECT statement drops a connection with the database server and releases all resources used by it. If the connection to be dropped was named on the CONNECT statement, then the name can be specified. Specifying ALL drops all of the connections of the application to all database environments. CURRENT is the default and drops the current connection.

An implicit ROLLBACK is executed on connections that are dropped.

Standards

  • SQL—ISO/ANSI SQL compliant.

  • Sybase—Supported by Open Client/Open Server.

Permissions

None

Related reference
CONNECT Statement [ESQL] [Interactive SQL]
SET CONNECTION Statement [ESQL] [Interactive SQL]