DEFAULT Option

DISCONNECT DEFAULT disconnects the default connection.

The default connection is one of the following connections:
  • A connection established by the CONNECT TO DEFAULT statement
  • An implicit default connection established by the DATABASE or CREATE DATABASE statement
You can use DISCONNECT to drop the default connection. If the DATABASE statement does not specify a database server, as in the following example, the default connection is made to the default database server:
EXEC SQL database 'stores_demo';
. . .
EXEC SQL disconnect default;
If the DATABASE statement specifies a database server, as the following example shows, the default connection is made to that database server:
EXEC SQL database 'stores_demo@mydbsrvr';
. . .
EXEC SQL disconnect default;

In either case, the DEFAULT option of DISCONNECT disconnects this default connection. For more information, see The DEFAULT Connection Specification.