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 the application's
connections to all database environments. CURRENT is the default, and will drop the current connection.
Before closing the database connection, Interactive SQL automatically executes a COMMIT statement if the commit_on_exit option
is set to On. If this option is set to Off, Interactive SQL performs an implicit ROLLBACK. By default, the commit_on_exit
option is set to On.
This statement is not supported in procedures, triggers, events, or batches.
SQL/2008
DISCONNECT comprises optional SQL language feature F771 of the SQL/2008 standard. The ability to specify DISCONNECT without
a parameter is a vendor extension. The commit_on_exit option is a vendor extension.