DROP CONNECTION Statement

Drops any user connection to the database.

Syntax

DROP CONNECTION connection-id

Examples

Usage

DROP CONNECTION disconnects a user from the database by dropping the connection to the database. You cannot drop your current connection; you must first create another connection, then drop your first connection.

The connection-id for the connection is obtained using the connection_property function to request the connection number. This statement returns the connection ID of the current connection:

SELECT connection_property( 'number' )

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

  • Sybase—Not supported by Adaptive Server Enterprise.

Permissions

Requires DBA or OPERATOR authority.

Related reference
CONNECT Statement [ESQL] [Interactive SQL]