#docslug#/ecob/ecob/V1.1.6/simple-dynamic-sql OceanBase Embedded SQL in C (ECOB) uses the EXECUTE IMMEDIATE statement to execute dynamic SQL statements. These dynamic SQL statements can be created at runtime. However, they cannot use host variables.
Syntax:
EXEC SQL EXECUTE IMMEDIATE ('sql text' | : host_string)

Example 1:
EXEC SQL EXECUTE IMMEDIATE 'select 1 from dual';
Example 2:
char * sql_stat="select 1 from dual";
EXEC SQL EXECUTE IMMEDIATE :sql_stat;