This example uses the exists() function:
MATCH (p:Person)
WHERE exists((p)-[:LIVING_IN]->(:Country {name: 'Germany'}))
RETURN p.name
ORDER BY p.name;
How is that query different than:
MATCH (p:Person)-[:LIVING_IN]->(:Country {name: 'Germany'})
RETURN p.name
ORDER BY p.name
Why should I use the exist()
function?
I don't understand what is the difference or use case for the exist() function.