Mimer SQL Reference Manual TOC PREV NEXT INDEX

Mimer Developer Site


The IN Predicate

An IN predicate tests whether a value is contained in a set of discrete values and has the form:

If the set of values on the right hand side of the comparison is given as an explicit list, an IN predicate may always be expressed in terms of a series of basic predicates linked by one of the logical operators AND or OR:

IN predicate
Equivalent basic predicates
x IN (a,b,c)
x = a OR x = b OR x = c
x NOT IN (a,b,c)
x <> a AND x <> b AND x <> c

If the set of values is given as a select-specification, an IN predicate is equivalent to a quantified predicate:

IN predicate
Equivalent quantified predicates
x IN (subselect)
x = ANY (subselect)
x NOT IN (subselect)
x <> ALL (subselect)

The result of the IN predicate is unknown if the equivalent predicates give an unknown result.

Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
Mimer SQL Reference Manual TOC PREV NEXT INDEX