From and Where Clause

Description

From: Specifies a list of source tables that supply values for assignment to target table columns.

Where: Introduces a condition that indicates what rows are updated.

All the grammar specified in this From and Where clause of DB2 is ANSI compliant, equivalent to Snowflake, and is therefore translated as is by SnowConvert.

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

Grammar Syntax

Sample Source Patterns

IBM DB2

UPDATE INV AS I
      SET I.LOCATION = S.STORENAME
      FROM STORE AS S
      WHERE I.STORENO = S.STORENO;

Snowflake

UPDATE PUBLIC.INV AS I
      SET I.LOCATION = S.STORENAME
      FROM STORE AS S
      WHERE I.STORENO = S.STORENO;

Last updated