Help Center/ GaussDB/ Developer Guide(Distributed_V2.0-8.x)/ Application Development Guide/ ECPG-based Development/ Running SQL Commands/ Embedded SQL Commands/ SET CONNECTION
Updated on 2025-08-19 GMT+08:00
SET CONNECTION
Function
Sets a database connection.
Syntax
SET CONNECTION [ TO | = ] connection_name
Parameter Description
- connection_name
Name of a database connection established by the CONNECT command.
Example
EXEC SQL SET CONNECTION TO con2; EXEC SQL SET CONNECTION = con1;
Helpful Links
CONNECT and DISCONNECT
Parent topic: Embedded SQL Commands
What is your overall rating for this page?
0
1
2
3
4
5
6
7
8
9
10
Very dissatisfiedVery satisfied
Thank you very much for your feedback. We will continue working to improve the documentation.
The system is busy. Please try again later.