Reference Manual
CHAPTER 9. SQL Statements
To change the active database connection.
SET CONNECTION [connection-name]
connection-name:
identifier, string, or host-variable
None.
None.
The SET CONNECTION statement changes the active database connection to connection-name. The current connection state is saved, and will be resumed when it again becomes the active connection. If connection-name is omitted and there is a connection that was not named, that connection becomes the active connection.
Cursors and connections |
SQL/92 Interactive SQL use is a vendor extension. Embedded SQL is a Full level feature.
Sybase Supported by Open Client/Open Server.
The following example is in Embedded SQL.
EXEC SQL SET CONNECTION :conn_name;
From Interactive SQL, set the current connection to the connection named conn1.
SET CONNECTION conn1 ;