Updated on 2024-12-06 GMT+08:00

Dynamic SQL Statements

Table 1 Dynamic SQL statement execution modes

No.

Oracle Database

GaussDB

Difference

1

EXECUTE IMMEDIATE

Supported, with differences.

  • GaussDB uses the dynamic_sql_compat parameter to determines whether variables with the same name read the same parameter and check whether the input and output parameter types of the bound parameters are the same as those of the statement parameters when the stored procedure is called.
  • GaussDB does not support scenarios where some bound parameters in anonymous blocks are called. For example, when dynamic statements are nested in anonymous blocks, expressions are used to bind parameters. For details, see "Stored Procedure > Dynamic Statements > Dynamically Calling Anonymous Blocks" in Developer Guide.
  • GaussDB does not support RETURNING or RETURN INTO.

2

OPEN FOR, FETCH, CLOSE

Supported.

-