Creating SET clauses in UPDATE statements in the SQL builder

After you add a table to an UPDATE statement in the SQL builder, you can create a SET clause. The SET clause specifies the columns to update and the new values for the columns.

You can add individual columns and groups of columns to the SET clause. In a group, you can provide values for individual columns or for the entire group of columns. You can specify a subquery to provide values for a group of one or more columns.

The default value that is shown for each column depends on how the column was defined when the table was created.
  • If the column was defined with a default value, the cell value is DEFAULT.
  • If the column was not defined with a default value and the column is nullable, the cell value is NULL.
  • If the column was not defined with a default value and the column is non-nullable, the cell value is a pair of single quotes.
Prerequisites:
  • The UPDATE statement must be open in the SQL builder.
  • The UPDATE statement must contain a table specification.

To create a SET clause:

  1. In the Design pane of the SQL builder, click the Set tab.
  2. Add columns to the SET clause individually or as a group:
    • To add columns individually, click a column in the list and then click >.
    • To add columns as a group, select multiple columns and then click the group button.
  3. Specify values for one or more columns. In the row that contains the column or group of columns, double-click the cell under the Expression heading. Type a value or expression, or use the Expression Builder wizard to specify a subquery or create a more complex expression.
Related reference
SQL builder Design pane - Set page

Feedback