Help Center/
GaussDB/
Developer Guide(Centralized_3.x)/
Application Development Guide/
ECPG-based Development/
Running SQL Commands/
Embedded SQL Commands/
EXECUTE IMMEDIATE
Updated on 2024-05-07 GMT+08:00
EXECUTE IMMEDIATE
Function
Immediately prepares and executes a dynamically specified SQL statement without retrieving result rows.
Syntax
EXECUTE IMMEDIATE string
Parameters
string
A C string or host variable that contains the SQL statement to be executed.
Examples
The following is an example of executing the INSERT statement using EXECUTE IMMEDIATE and a host variable named command:
sprintf(command, "INSERT INTO test (name, amount, letter) VALUES ('db: ''r1''', 1, 'f')"); EXEC SQL EXECUTE IMMEDIATE :command;
Parent topic: Embedded SQL Commands
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot