Search Condition; Considerations For Search Condition; Order Of Evaluation; Column References - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

Search Condition

A search condition is used to choose rows from tables or views, depending on the result of
applying the condition to rows. The condition is a Boolean expression consisting of predicates
combined together with OR, AND, and NOT operators.
You can use a search condition in the WHERE clause of a SELECT, DELETE, or UPDATE
statement, the HAVING clause of a SELECT statement, the NOT CASESPECIFIC clause of a
SELECT statement, the searched form of a CASE expression, the ON clause of a SELECT statement
that involves a join, a CHECK constraint, or a ROWS SINCE sequence function.
search-condition is:
boolean-term | search-condition OR boolean-term
boolean-term is:
boolean-factor | boolean-term AND boolean-factor
boolean-factor is:
[NOT] boolean-primary
boolean-primary is:
predicate | (search-condition)
OR
specifies the resulting search condition is true if and only if either of the surrounding
predicates or search conditions is true.
AND
specifies the resulting search condition is true if and only if both the surrounding predicates
or search conditions are true.
NOT
reverses the truth value of its operand—the following predicate or search condition.
predicate
is a BETWEEN, comparison, EXISTS, IN, LIKE, NULL, or quantified comparison predicate.
A predicate specifies conditions that must be satisfied for a row to be chosen. See
(page 233)

Considerations for Search Condition

Order of Evaluation

SQL evaluates search conditions in this order:
1.
Predicates within parentheses
2.
NOT
3.
AND
4.
OR

Column References

Within a search condition, a reference to a column refers to the value of that column in the row
currently being evaluated by the search condition.

Subqueries

If a search condition includes a subquery and the subquery returns no values, the predicate
evaluates to null. See
248
SQL Language Elements
and individual entries.
"Subquery" (page
250).
"Predicates"

Advertisement

Table of Contents
loading

Table of Contents