NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
I-4
Examples—IN
°
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 the following 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
Examples—IN
The following predicate finds those employees whose number is 39, 337, or 452:
EMPNUM IN (39, 337, 452)
The following predicate finds those items whose part number is not in the
PARTLOC table:
PARTNUM NOT IN (SELECT PARTNUM
FROM INVENT.PARTLOC)
INCLUDE SQLCA Directive
INCLUDE SQLCA is a host program directive that declares the SQL communication
area (SQLCA) in a host program.
The SQLCA is a status-checking area for host programs. SQL clears and reinitializes the
SQLCA before each SQL statement executes. After the statement executes, SQL stores
information about the success or failure of the statement in the SQLCA, including error
and warning codes and messages.
For detailed information about the contents and use of the SQLCA, see the NonStop
SQL/MP programming manual for your host language.
Considerations—INCLUDE SQLCA
Version management considerations
By default, INCLUDE SQLCA declares a version 2 SQLCA. To request a different
version, use INCLUDE STRUCTURES prior to INCLUDE SQLCA.
INCLUDE SQLCA