In our simplified BNF, predicate can be defined as a statement that can be evaluated to either TRUE or FALSE. Table H-2 "decodes" SQL syntax for predicates.
Element |
Syntax |
---|---|
<predicate> |
<boolean_term> [{AND | OR} <boolean_term>,...] |
<boolean_term> |
[NOT] <search_test> |
<search_test> |
<comparison_test> |
<between_test> |
|
<comparison_test> |
<column_value>
|
<between_test> |
<column_value>
|
<in_test> |
<column_value> [NOT] IN <expression_list> | <table_subquery> |
<like_test> |
<column_value> [NOT] LIKE <pattern> [ESCAPE <value>] |
<null_test> |
<column_value> IS [NOT] NULL |
<exists_test> |
EXISTS <table_subquery> |
<quantified_ comparisson_test> |
<column_value>
|
<expression_list> |
(<expression>,...) |
<expression> |
<sub-expression>
|
<sub-expression> |
[- | +] {<value> | <function>} |
<value> |
<literal> | <variable> |
<column_value> |
[qualifier.]<column_name> |