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.

The use of views, nicknames, and fullselect as targets for an update statement is not supported by Snowflake

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

The positioned update is not supported in Snowflake because the use of cursors in the update statement is not allowed

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

Last updated