SQL/MX 2.x Reference Manual (H06.04+)

SQL/MX Language Elements
HP NonStop SQL/MX Reference Manual540440-003
6-104
Rowset Search Condition
Select rows by using a search condition composed of three comparison predicates,
two of which are joined by an OR operator (within parentheses), and where the
result of the OR and the first comparison predicate are joined by an AND operator:
SELECT partnum, S.suppnum, suppname
FROM invent.supplier S,
invent.partsupp PS
WHERE S.suppnum = PS.suppnum
AND (partnum < 3000 OR partnum = 7102);
PARTNUM SUPPNUM SUPPNAME
------- ------- ------------------
212 1 NEW COMPUTERS INC
244 1 NEW COMPUTERS INC
255 1 NEW COMPUTERS INC
...
7102 10 LEVERAGE INC
--- 18 row(s) selected.
Rowset Search Condition
A search condition that contains a rowset predicate is a rowset search condition. A
rowset search condition applies an array of search conditions to tables or views
successively, starting from the first search condition, which is obtained from the first
rowset element, and proceeding to the last search condition, which is obtained from
the last rowset element. All the search conditions are applied in a single SQL
statement.
You can use a rowset search condition in the:
WHERE clause of a SELECT, DELETE, or UPDATE statement
HAVING clause of a SELECT statement
searched form of a CASE expression
ON clause of a SELECT statement that involves a join
For more information about rowsets, see the SQL/MX Programming Manual for C and
COBOL.