set connection

Description

Causes the specified existing connection to become the current connection.

Syntax

set connection {connection_name | DEFAULT};

Parameters

connection_name

The name of an existing connection that you want to become the current connection.

default

Specifies that the unnamed default connection is to become the current connection.

Examples

Example 1

exec sql connect "ME" at connect1 using "SERVER1";
 exec sql connect "ME" at connect2 using "SERVER2";
 
 /* The next statement executes on connect2. */
 exec sql select userid() into :myid;
exec sql set connection connect1;
/* The next statement executes on connect1. */
 exec sql select count(*)from t1;

Usage

See also

at connection_name, connect