8. SQL Statements : DISCONNECT : Syntax
 
Share this page                  
Syntax
The DISCONNECT statement has the following format:
EXEC SQL DISCONNECT [CURRENT] | connection_name |[SESSION session_identifier | ALL];
CURRENT
Terminates the current session.
SESSION session_identifier
Terminates the specified session, which is other than the current session in a multi-session application. To determine the numeric session identifier for the current session, use the INQUIRE_SQL(:session_id = SESSION) statement.
connection_name
Terminates the specified connection, which is other than the current session in a multi-session application. To determine the connection name for the current session, use the INQUIRE_SQL(:connection_name=connection_name) statement.
ALL
Disconnects all open sessions.
If an invalid session is specified, the DBMS Server issues an error and does not disconnect the session.