WHERE clause of SELECT

The WHERE clause can specify join conditions for Informix®-extension joins, post-join filters for ANSI-compliant joins, and for search criteria on data values.

This syntax fragment is part of the SELECT statement.
Read syntax diagramSkip visual syntax diagram
WHERE Clause

|--WHERE-------------------------------------------------------->

   .-Logical_Operator-------------------------------------.   
   V                 (1)                                  |   
>----+-| Condition |------------------------------------+-+-----|
     |          (2)                                     |     
     +-| Join |-----------------------------------------+     
     |                         (3)                      |     
     +-| Function Expression |--------------------------+     
     +-(subquery)---------------------------------------+     
     |                             (4)                  |     
     '-+-(-| Collection Subquery |-----)--------------+-'     
       |                                          (5) |       
       '-| Statement Local Variable Expressions |-----'       

Notes:
  1. See Condition
  2. See Specifying a Join in the WHERE Clause
  3. See Function Expressions
  4. See Collection Subquery
  5. See Statement-Local Variable Expressions
Element Description Restrictions Syntax
Logical_ Operator Combines two conditions Valid options are logical union (= OR or OR NOT) or logical intersection ( = AND or AND NOT) Conditions with AND or OR
subquery Embedded query Cannot include the FIRST or ORDER BY keywords SELECT statement