UPDATE STATEMENT

Description

The UPDATE statement updates the values of specified columns in rows of a table, view or nickname, or the underlying tables, nicknames, or views of the specified fullselect.

Click here to navigate to the IBM DB2 docs page for this syntax.

Grammar Syntax

Navigate to the following pages to get more details about the translation spec for the subsections of the UPDATE STATEMENT grammar.

Positioned Update

Description

The Positioned UPDATE form is used to update exactly one row (as determined by the current position of a cursor).

Grammar Syntax

IBM DB2

UPDATE EMPLOYEE
     SET JOB=NULL, SALARY=0, BONUS=0, COMM=0
     WHERE CURRENT OF cursor1;

Snowflake

-- ** MSC-ERROR - MSCEWI5009 - POSITIONED UPDATE IS NOT SUPPORTED. **
--UPDATE EMPLOYEE
--     SET JOB=NULL, SALARY=0, BONUS=0, COMM=0
--     WHERE CURRENT OF cursor1
  1. MSCEWI5009: POSITIONED UPDATE IS NOT SUPPORTED.

Last updated

Was this helpful?