Show TOC

Syntax documentationUPDATE Statement Locate this document in the navigation structure

The UPDATE statement allows updating the values of selected columns of rows of a database table.

Syntax Syntax

  1. <update statement> ::= UPDATE <table name> SET <assignment list> ( <where clause> )?.
    
    <assignment list> ::= <assignment> ( ',' <assignment> ).
    
    <assignment> ::= <column name> '=' <update source>.
    
    < update source > ::= <value expression> 
                                    | <dynamic parameter specification>
                                    | NULL.
    
End of the code.

Caution Caution

You cannot specify string literals as values for CLOB columns. Hex literals, date literals, time literals and timestamp literals are not supported in Open SQL.

End of the caution.

Example Example

  1. UPDATE employees SET employee_name = 'Mary Jones' 
                                     WHERE employee_id = 23
    
End of the code.

Updating Columns of a Table. The name of the employee with the employee_id 23 is updated to the new value 'Mary Jones' in the database table employees.