Show TOC

UPDATE StatementLocate this document in the navigation structure

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

            <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.

         
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.

Sample Code
               UPDATE employees SET employee_name = 'Mary Jones' 
                                 WHERE employee_id = 23

            

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 .