8. OpenSQL Statements : Disconnect : Syntax
 
Share this page                  
Syntax
The DISCONNECT statement has the following format:
EXEC SQL DISCONNECT [SESSION session_identifier | ALL]
session_identifier
Disconnects the specified session in a multi‑session application. The session_identifier must be a positive integer constant or variable containing the session identifier. To determine the session_identifier for the current session, use the INQUIRE_SQL(:session_id = SESSION) statement. If an invalid session is specified, OpenSQL issues an error and does not disconnect the session.
ALL
Disconnects all open sessions.