Was this helpful?
REPLACE--Replace Column Values
Valid in: QUEL, EQUEL
Replaces values of columns in a table.
This statement has the following format:
[##] [repeat] replace range_variable (target_list) [where qual]
The replace statement updates the values of the columns specified in the target_list for all rows in the table that satisfy the where clause. Only columns to be modified need appear in the target_list. To set a nullable column to null, specify the keyword null.
The replace statement also has a param version; the param function replaces the list of column names and expressions in the target list. Param statements are not supported in all host languages. For more information, see the Embedded QUEL Companion Guide.
You can reduce the overhead of frequently executed replace statements by specifying repeat replace. The repeat keyword directs the DBMS Server to encode and save its execution plan when the replace is first executed. This encoding can account for significant performance improvements on subsequent executions of the same replace. (If the repeat option is specified, program variables which appear on the right hand side of an equals sign (=) must be preceded by the @ sign.)
Last modified date: 06/08/2023