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:

  • All values specified in a predicate must be compatible.
  • An expression used in a basic, quantified, IN, or BETWEEN predicate must not result in a character string with a length attribute greater than 4000, a graphic string with a length attribute greater than 2000, or a LOB string of any size.
  • The value of a host variable can be null (that is, the variable may have a negative indicator variable).
  • The code page conversion of operands of predicates involving two or more operands, with the exception of LIKE, is done according to the rules for string conversions.
  • Use of a structured type value is limited to the NULL predicate and the TYPE predicate.
  • In a Unicode database, all predicates that accept a character or graphic string will accept any string type for which conversion is supported.

A fullselect is a form of the SELECT statement that, when used in a predicate, is also called a subquery.

Row-value-expression

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

row-value-expression
Read syntax diagramSkip visual syntax diagram( ,expression )

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