Comparison Functions and Operators Overview

NameDescription
>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
ISTest a value against a boolean
IS NOTTest a value against a boolean
IS NOT NULLNOT NULL value test
IS NULLNULL value test
LIKESimple pattern matching
NOT BETWEEN … AND …Whether a value is not within a range of values
NOT LIKENegation of simple pattern matching
COALESCEReturn the first non-null value in a list

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:

  1. = > < >= <= <> !=