UNION
Combine results from two queries into a single result set.
Syntax#
query1 UNION query2Example#
MATCH (n:Person) RETURN n.name AS name
UNION
MATCH (n:Organization) RETURN n.name AS nameReturns all person and organization names in a single column.
See Also#
- WITH — query chaining (within one query)
Try it
Open ↗⌘↵ to run
Loading engine…