In Predicate; Considerations For In - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

WHERE EXISTS
(SELECT partnum FROM invent.partloc PL
WHERE PS.partnum = PL.partnum AND qty_on_hand < 20);
PARTNUM
-------
212
212
2001
2003
...
--- 18 row(s) selected.

IN Predicate

"Considerations for IN"

"Examples of IN"
The IN predicate determines if a sequence of values is equal to any of the sequences of values
in a list of sequences. The NOT operator reverses its truth value. For example, if IN is true, NOT
IN is false.
row-value-constructor
[NOT] IN {table-subquery | in-value-list}
row-value-constructor is:
(expression [,expression]...)
| row-subquery
in-value-list is:
(expression [,expression]...)
row-value-constructor
specifies the first operand of the IN predicate. The first operand can be either of:
(expression [,expression ]...)
is a sequence of SQL value expressions, separated by commas and enclosed in parentheses.
expression cannot include an aggregate function unless expression is in a HAVING
clause. expression can be a scalar subquery (a subquery that returns a single row
consisting of a single column). See
row-subquery
is a subquery that returns a single row (consisting of a sequence of values). See See
"Subquery" (page
table-subquery
is a subquery that returns a table (consisting of rows of columns). The table specifies rows
of values to be compared with the row of values specified by the row-value-constructor.
The number of values of the row-value-constructor must be equal to the number of
columns in the result table of the table-subquery, and the data types of the values must
be comparable.
in-value-list
is a sequence of SQL value expressions, separated by commas and enclosed in parentheses.
expression cannot include an aggregate function defined on a column. expression can
be a scalar subquery (a subquery that returns a single row consisting of a single column). In
this case, the result of the row-value-constructor is a single value. The data types of
the values must be comparable. The number of expressions in the in-value-list can have
at least 5000 values.
Considerations for IN
Logical Equivalent Using ANY (or SOME)
SUPPNUM
-------
1
3
1
2
250).
"Expressions" (page
208).
Predicates
239

Advertisement

Table of Contents
loading

Table of Contents