ALLBASE/SQL Reference Manual (36216-90216)

268 Chapter9
Search Conditions
IN Predicate
IN Predicate
An IN predicate compares an expression with a list of specified values or a list of values
derived from a subquery. The predicate evaluates to TRUE if the expression is equal to one
of the values in the list. If the NOT option is used, the predicate evaluates to TRUE if the
expression is not equal to any of the values in the list.
Scope
SQL Data Manipulation Statements
SQL Syntax
Expression
[NOT] IN {
SubQuery
{ValueList)
}
Parameters
Expression
An expression specifies a value to be obtained. The syntax
of expressions is presented in Chapter 8 , “Expressions.
Both numeric and non-numeric expressions are allowed in
quantified predicates. The expression may not include
subqueries or LONG columns.
NOT reverses the value of the predicate that follows it.
SubQuery
A subquery is a nested query. The syntax of subqueries is
presented in the description of the SELECT statement in
Chapter 12 , “SQL Statements S - Z.
ValueList
defines a list of values to be compared against the
expression's value. The syntax for
ValueList
is:
{ USER
CurrentFunction
[ + - ] {
Integer
Float
Decimal
}
‘CharacterString’
OxHexadecimalString
:
HostVariable
[[INDICATOR]:
IndicatorVariable
]
?
:
Local Variable
:
ProcedureParameter
::
Built-inVariable
LongColumnFunction
StringFunction
} [, ...]
USER USER evaluates to the DBEUserID. In ISQL, it evaluates
to the DBEUserID of the ISQL user. From an application
program, it evaluates DBEUserID of the individual