Skip to content

Comparison Functions and Operators Overview

Name Description
> Greater than operator
>= Greater than or equal operator
< Less than operator
<>,!= Not equal operator
<= Less than or equal operator
= Equal operator
BETWEEN ... AND ... Whether a value is within a range of values
IN() Whether a value is within a set of values
IS Test a value against a boolean
IS NOT Test a value against a boolean
IS NOT NULL NOT NULL value test
IS NULL NULL value test
LIKE Simple pattern matching
NOT BETWEEN ... AND ... Whether a value is not within a range of values
NOT LIKE Negation of simple pattern matching

Comparison operations result in a value of TRUE, FALSE, or NULL. These operations work for both numbers and strings. Strings are automatically converted to numbers and numbers to strings as necessary.

The following relational comparison operators can be used to compare not only scalar operands, but row operands:

=  >  <  >=  <=  <>  !=