In Cypher, null
is used to represent missing or undefined values.
Conceptually, null
means 'a missing unknown value' and it is treated somewhat differently from other values.
For example getting a property from a node that does not have said property produces null
.
Most expressions that take null
as input will produce null
.
This includes boolean expressions that are used as predicates in the WHERE
clause.
In this case, anything that is not true
is interpreted as being false.
null
is not equal to null
.
Not knowing two values does not imply that they are the same value.
So the expression null
= null
yields null
and not true
.
The logical operators (AND
, OR
, XOR
, IN
, NOT
) treat null
as the 'unknown' value of threevalued logic.
Here is the truth table for AND
, OR
and XOR
.
a  b  a AND b

a OR b

a XOR b















































The IN
operator follows similar logic.
If Cypher knows that something exists in a list, the result will be true
.
Any list that contains a null
and doesn’t have a matching element will return null
.
Otherwise, the result will be false.
Here is a table with examples:
Expression  Result 

2 IN [1, 2, 3] 

2 IN [1, 

2 IN [1, 2, 

2 IN [1] 

2 IN [] 







Using all
, any
, none
, and single
follows a similar rule.
If the result can be calculated definitely, true
or false
is returned.
Otherwise null
is produced.
[][0]
, head([])
n.missingProperty
null
: 1 < null
null
: 1 + null
null
: sin(null)