I have a neo4j database with some data in it. Most of the nodes have a name
property, but not all of them; I'd like to construct a Cypher query to match and return all those that don't.
I've tried all the following, but all of them give 0 results:
MATCH (n { name: NULL }) RETURN n
MATCH (n { name: null }) RETURN n
MATCH (n) WHERE n.name = NULL RETURN n
MATCH (n) WHERE n.name = null RETURN n
However, I have at least one node with no name
property specified, which I can prove either through
MATCH (n) WHERE id(n) = 4 RETURN n
and examining the node in the results view, or by noting that
MATCH (n) WHERE id(n) = 4 RETURN n.name
returns null
.
How do I match all the nodes that don't have a name
property?