Predicates

A predicate specifies a condition that is true, false, or unknown about a given value, row, or group.

The following rules apply to all types of predicates:

  • Predicates are evaluated after the expressions that are operands of the predicate.
  • All values specified in the same predicate must be compatible.
  • The value of a variable may be null (that is, the variable may have a negative indicator variable).
  • The CCSID conversion of operands of predicates involving two or more operands are done according to Conversion rules for comparison:.
  • Use of a DataLink value is limited to the NULL predicate.

Row-value expression: The operand of several predicates (basic, quantified, and IN) can be a row-value-expression:

Read syntax diagramSkip visual syntax diagram(,expression)

A row-value-expression returns a single row that consists of one or more column values. The values can be specified as a list of expressions. The number of columns that are returned by the row-value-expression is equal to the number of expressions that are specified in the list.