Comparison Operators

Comparison operators are used to test the equality of two input expressions. They are typically used in the WHERE clause of a query.

Operator

Syntax

Description

=

a = b

a is equal to b.

!=

a != b

a is not equal to b.

<>

a <> b

a is less than or greater than b.

>

a > b

a is greater than b.

>=

a >= b

a is greater than or equal to b.

<

a < b

a is less than b.

<=

a <= b

a is less than or equal to b.