Updated on 2026-05-16 GMT+08:00

Dynamic SQL

Table 1 Dynamic SQL statement execution modes

No.

Oracle

GaussDB

Difference

1

EXECUTE IMMEDIATE

Supported with differences

  • GaussDB uses the dynamic_sql_compat parameter to control whether to read the same parameter for variables with the same name, and checks whether the input and output parameter types of the bound parameters are the same as the statement parameter types when the stored procedure is called.
  • GaussDB does not support RETURNING or RETURN INTO.

2

OPEN FOR, FETCH, CLOSE

Supported

GaussDB uses the dynamic_sql_compat parameter to control whether to read the same parameter for variables with the same name, and checks whether the input and output parameter types of the bound parameters are the same as the statement parameter types when the stored procedure is called.