Specify conditions in the WHERE clause

You can specify conditions in the WHERE clause for several statements to specify rows on which to operate.

These statements can include a WHERE clause to specify rows on which to operate:
  • For the DELETE statement, the WHERE clause specifies rows to delete.
  • For the INSERT or MERGE statement with an embedded SELECT, the WHERE clause specifies which rows to insert from another table.
  • For the UPDATE or MERGE statement, the WHERE clause specifies which rows to update. In addition, the SET clause of UPDATE or MERGE can include an embedded SELECT statement whose WHERE clause identifies a row whose values are to be assigned to another row.
  • For the UNLOAD feature of DB-Access, the WHERE clause of the embedded SELECT specifies which rows to unload.

The choice of a locale affects these uses of a WHERE clause in the same way that it affects the WHERE clause of a SELECT. For more information, see Logical predicates in a WHERE clause and Comparisons with MATCHES and LIKE conditions.