Show TOC

Search ConditionLocate this document in the navigation structure

Search conditions are used in the WHERE clause , HAVING clause and the ON conditions of the Joined Table . They are used to filter results of queries or to determine the evaluation of joins. Search conditions follow a three valued logic. The result of a search condition is true, false or unknown . A search condition is either a predicate or a complex Boolean expression of multiple search conditions.

            <search condition> ::= <predicate>
                                  | <boolean expression>. 

<predicate> ::= <comparison predicate> 
                      | <quantified comparison predicate> 
                      | <between predicate> 
                      | <in predicate> 
                      | <like predicate> 
                      | <null predicate> 
                      | <exists predicate>.

         

Example

               SELECT * FROM a WHERE NOT ( c < 1 ) AND c <= 100
            

This SELECT yields all rows from table a where the value of the column a.c not lower than 1 and lower or equal to 100 .