📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

Comparison Operators



OperatorDescriptionExampleResult
=a is equal to b2 = 2TRUE
!=a is not equal to b2 != 3TRUE
<>a is not equal to b2 <> 2FALSE
>a is greater than b2 > 3FALSE
>=a is greater than or equal to b4 >= NULLNULL
<a is less than b2 < 3TRUE
<=a is less than or equal to b2 <= 3TRUE
IS NULLTRUE if expression is NULL, FALSE otherwise(4 >= NULL) IS NULLTRUE
IS NOT NULLFALSE if expression is NULL, TRUE otherwise(4 >= NULL) IS NOT NULLFALSE

Was this page helpful?