OPTIONAL MATCH

Left-join, but for patterns — keep the row even when the relationship is missing.

0/2 done

Left-join for patterns

OPTIONAL MATCH

Plain MATCH is an inner join — rows where the pattern doesn't bind are dropped. OPTIONAL MATCH is a left join — unbound variables become null instead of removing the row.

Use it whenever 'this part is optional' is a real product requirement: a Person might or might not have a manager, an item might or might not be on sale.

Reading in progress · 0 of 2 activities done