DISCONNECT statement [ESQL][Interactive SQL]
504
DISCONNECT statement
[ESQL][Interactive SQL]
Use this statement to drop a connection with the database.
DISCONNECT
connection-name
| [ CURRENT ]
| ALL
connection-name
:
identifier
,
string,
or
host-variable
.
None.
None.
"CONNECT statement" on page 423
"SET CONNECTION statement" on page 610
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, the name can be specified. Specifying
ALL will drop all of the application’s connections to all database
environments. CURRENT is the default, and will drop the current
connection.
An implicit ROLLBACK is executed on connections that are dropped.
♦
SQL/92 Intermediate level feature.
♦
Sybase Supported by Open Client/Open Server.
♦ The following statement shows how to use DISCONNECT in
Embedded SQL:
EXEC SQL DISCONNECT :conn_name
♦ The following statement shows how to use DISCONNECT from
Interactive SQL to disconnect all connections:
DISCONNECT ALL
Function
Syntax
Permissions
Side effects
See also
Description
Standards and
compatibility
Examples