Apache Hive : HPL/SQL - Equality and Comparison Operators

Last updated: August 12, 2026

Apache Hive : HPL/SQL - Equality and Comparison Operators

You can use equality and comparison operators =, ==, <>, !=, <, >, >=, <= to determine if one operand is equal, not equal, less or greater than another operand.

===Equal
<>!=Not equal
>Greater than
<Less than
>=Greater than or equal
<=Less than or equal

Syntax:

expr = expr 
expr == expr
expr <> expr
expr != expr
expr > expr
expr < expr
expr >= expr
expr <= expr

Examples:

ExpressionResultResult Type
3 = 3TrueBoolean
3 = 1FalseBoolean
‘CA’ = NULLNULLBoolean
3 == 3TrueBoolean
3 <> 3FalseBoolean
3 != 3FalseBoolean
3 > 1TrueBoolean
3 < 1FalseBoolean
3 >= 1TrueBoolean
3 <= 1FalseBoolean