1 SET_Control Assigns a value to a target parameter or a variable name. 2 Environment You can use the SET assignment control statement in a compound statement: o In interactive SQL o Embedded in host language programs to be precompiled o As part of a procedure in an SQL module o In dynamic SQL as a statement to be dynamically executed 2 Format set-assignment-statement = SET -+-> -----+-> = --+--> value-expr -+-> +-> -+ +--> NULL -------+ 2 Arguments 3 NULL Assigns the NULL value to a target parameter or variable name. 3 parameter Specifies the target where SQL stores a value expression or the NULL value. 3 value-expr Assigns the value of a value expression to a target parameter or variable name. 3 variable-name Specifies the target where SQL stores a value expression or the NULL value. 2 Examples Example 1: Assigning a value expression to a target parameter BEGIN SET :y = (SELECT COUNT (*) FROM employees); END; Example 2: Assigning the NULL value expression to a target parameter BEGIN SET :z = NULL; END;