Comparison Operators

These operations test whether two expressions are equal. Comparison Operators result in a value of true, false or null. The following tables show the usual comparison operators that can be used for all simple data types:

OperatorDescription
<less than
>greater than
<=less than or equal to
>=greater than or equal to
=equal
<>not equal
!=not equal - same as <>

If used in the WHERE Clause the following operators are valid in addition.

OperatorDescription
LIKEmatches a part of the given value
NOTnegates a condition
IS NULLmatches a NULL value
IS NOT NULLmatches a Non-NULL value
~regular expression match
!~negated regular expression match
betweena BETWEEN x and y: shortcut for a >= x AND a <= y