SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
I-3
IN Predicate
IN Predicate
IN is a predicate that determines if a value is equal to any of the values in a list or 
collection of values.
subquery
is a subquery that has a result table of one column. For more information, see 
Subqueries on page S-82.
expression1 or expression
is an expression. For more information, see Expressions on page E-21.
The data type (including the character set for a character data type) of 
expression1 must be compatible with the data type of the value returned by the 
subquery or the results of all expressions in the list.
Rules for comparisons of string and numeric values are the same as for 
comparison predicates. For more information, see Comparison Predicate on 
page C-58.
The maximum number of expressions you can specify in expression-list is 
410.
Considerations—IN
The IN predicate is true if either of this is true:
The first expression is equal to any expression in the list or to a value selected 
by the subquery.
The subquery returns no values.
The NOT operator reverses the value obtained from evaluating a search 
condition. For example, if IN is true, NOT IN is false, and so on.
The IN predicate evaluates to null if either of this is true:
expression1 evaluates to null.
The predicate is not true for any value returned by the subquery and the 
subquery returns at least one null value
expression1 [ NOT ] IN { ( subquery ) }
 { ( expression-list ) }
expression-list is: 
 expression [ , expression ] ... 










