Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   Data Types and Expressions >

Condition

Use a condition to test whether data meets certain qualifications. Use this segment wherever you see a reference to a condition in a syntax diagram.

Syntax

Read syntax diagramSkip visual syntax diagramCondition:
 
   .-Logical_Operator-----------------------------------.
   V                                      (1)           |
|----+-----+--+-| Comparison Conditions |-------------+-+-------|
     '-NOT-'  |                             (2)       |
              +-| Condition with Subquery |-----------+
              |  (3)                             (4)  |
              '--------| User-Defined Function |------'
 
Notes:
  1. See page Comparison Conditions (Boolean Expressions)
  2. See page Condition with Subquery
  3. Dynamic Server only
  4. See page User-Defined Functions

Element Description Restrictions Syntax
Logical
_Operator
Combines two conditions Valid options are OR ( = logical union) or AND ( = logical intersection) Condition with AND or OR, p. Conditions with AND or OR

Usage

A condition is a search criterion, optionally connected by the logical operators AND or OR. Conditions can be classified into the following categories:

A condition can contain an aggregate function only if it is used in the HAVING clause of a SELECT statement or in the HAVING clause of a subquery.

No aggregate function can appear in a condition in the WHERE clause of a DELETE, SELECT, or UPDATE statement unless both of the following are TRUE:

In Dynamic Server, user-defined functions are not valid as conditions in the following contexts:

SPL routines are not valid as conditions in the following contexts:

External routines are not valid as conditions in the following contexts:

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]