Progress
SQL-92
Guide and Reference


Relational Operators

Relational operators specify how SQL compares expressions in basic and quantified predicates.

This is the syntax for a relational operator (relop):

SYNTAX
= 
|  <>  |  !=  |  ^=   
|  <  
|  <=  
|  >  
|  >=   

Table 2–2 lists the relational operators and the resulting predicate for each operator.

See the "Basic Predicate" section for more information.

Table 2–2: Relational Operators and Resulting Predicates
Relational Operator
Predicate for this Relational Operator
=
True if the two expressions are equal.
<> | != | ^=
True if the two expressions are not equal. The operators != and ^= are equivalent to <>.
<
True if the first expression is less than the second expression.
<=
True if the first expression is less than or equal to the second expression.
>
True if the first expression is greater than the second expression.
>=
True if the first expression is greater than or equal to the second expression.

NOTE: For data sorting and comparison of character data, the SQL server uses a Progress collation table. The result of comparison is based on the sort weight of each character in the collation table, for these relational operators:

>     <     =     >=     <=     ! 


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095