Skip to Content
Cypher ManualExpressionComparison Operators

Comparison Operators

We demonstrate the various Comparison Operators supported by NeuG through the following table.

OperatorDescriptionExampleResult
=Equal to1 = 1true
<>Not equal to1 <> 2true
<Less than1 < 2true
<=Less than or equal to1 <= 1true
>Greater than3 > 2true
>=Greater than or equal to3 >= 3true

NULL Value Handling

NeuG handles NULL values in comparisons according to SQL “three-valued logic” standards, where results of comparisons can be one of true, false, and NULL. When any operand in a comparison operation is NULL, the result is always NULL, regardless of the comparison operator used.

The following table demonstrates how NULL values are handled in comparison operations:

OperatorExampleResult
=NULL = NULL, NULL = 1NULL
<>NULL <> NULL, NULL <> 1NULL
<NULL < NULL, NULL < 1NULL
<=NULL <= NULL, NULL <= 1NULL
>NULL > NULL, NULL > 1NULL
>=NULL >= NULL, NULL >= 1NULL