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

Relational Operator

A relational operator compares two expressions quantitatively. Use the Relational Operator segment whenever you see a reference to a relational operator in a syntax diagram.

Syntax

Read syntax diagramSkip visual syntax diagramRelational Operator:
 
|--+- <--------+------------------------------------------------|
   +- <=-------+
   +- >--------+
   +-+- =--+---+
   | '- ==-'   |
   +- >=-------+
   +- <>-------+
   |  (1)      |
   '--------!=-'
 
Notes:
  1. Informix extension

Usage

The relational operators of SQL have the following meanings.

Relational Operator
Meaning
<
Less than
<=
Less than or equal to
>
Greater than
= or ==
Equal to
>=
Greater than or equal to
<> or !=
Not equal to

Usage

For number expressions, greater than means to the right on the real line.

For DATE and DATETIME expressions, greater than means later in time.

For INTERVAL expressions, greater than means a longer span of time.

For CHAR, VARCHAR, and LVARCHAR expressions, greater than means after in code-set order. (For NCHAR and NVARCHAR expressions, greater than means after in the localized collation order, if one exists; otherwise, it means in code-set order.)

Locale-based collation order, if defined for the locale, is used for NCHAR and NVARCHAR expressions. So for NCHAR and NVARCHAR expressions, greater than means after in the locale-based collation order. For more information on locale-based collation order and the NCHAR and NVARCHAR data types, see the IBM Informix GLS User's Guide.

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