After you add a table to an UPDATE statement in the SQL
Query Builder, you can create a SET clause. The SET clause specifies
the columns to update and the new values for the columns.
Before you begin
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.
Before creating SET clauses, ensure the following requirements
are met:
- The UPDATE statement must be open in the SQL Query Builder.
- The UPDATE statement must contain a table specification.
Procedure
To create a SET clause:
- In the Design pane of the SQL Query Builder, click the Set tab.
- 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.
- 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.