DISCONNECT
The DISCONNECT statement closes the connection with the database.
General format
EXEC SQL [ AT Database ] DISCONNECT [ { Connection-Name } ] { CURRENT } { ALL } END-EXEC |
Syntax rules
General rules
1. CURRENT is default.
2. When the ALL phrase is specified, the application is disconnected from all connected databases.
3. Database identifies the active connection that will execute the query and must be previously defined using a Format 4
DECLARE statement.
Examples
Disconnect from the current connection
exec sql disconnect end-exec |