Javatpoint Logo
Javatpoint Logo

Neo4j Optional MATCH Clause

The Neo4j Optional MATCH clause is used to search for the pattern described in it, while using nulls for missing parts of the pattern.

It is similar to MATCH clause; the only difference is that if it finds the missing parts of the pattern then it returns null as the result.

Syntax:

Example:

Let's take an example of Optional match to retrieve the relations from the node ICCT2013. Since there are no such nodes, it returns null.

Output:

Neo4j Optional match function 1
Next TopicNeo4j Where Clause




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials