Assign a value to an assignment target.
The SET statement is used to assign values to assignment targets such as SQL variables, SQL parameters and columns of a transition table.
|♦||The data types of the assignment target and the assignment source shall be compatible.|
|1)||The following example assigns a value to the name SQL variable:|
SET name = firstName || ' ' || lastName;
|2)||The following example assigns a value to a column of the transition table pointed to by the NEW variable in the context of a trigger definition:|
SET NEW.lastUpdated = CURRENT_TIMESTAMP;
SQL/PSM Feature P002-05 "Assignment statement"