DISCONNECT

Disconnects a user from the specified connection.

disconnect.png

 

Usage

Embedded, Interactive, Module.

Description

The specified connection is disconnected. Any current transaction is rolled back, cursors are closed, and compiled statements are destroyed. No further access to the database using that connection is possible.

If the specified connection is not the current connection the application still has access to the current connection. Otherwise, to continue with another connection the application must either perform a SET CONNECTION or a CONNECT statement.

The connection is not case-sensitive and may be specified as a literal value or by using a host variable.

If no disconnect option is specified, CURRENT is assumed by default.

The DISCONNECT statement may not be issued within a transaction. The transaction must first be ended using COMMIT or ROLLBACK, before DISCONNECT can be performed.

Example

DISCONNECT 'connection 1';

Standard Compliance

Standard

Compliance

Comments

SQL-2016

Features outside core

Feature F771, “Connection management”.

 

Mimer SQL extension

Support for DISCONNECT without any option is a Mimer SQL extension.