Search code examples
memgraphdb

Using FOREACH caluse in Memgrpah 2.1


I'm running Memgrpah 2.1 (Platform docker image) and I can't get FOREACH caulse for me to work:

FOREACH ( a IN [1, 2, 3] | CREATE (n {age : a}))
MATCH (n) RETURN n.age

What am I missing?


Solution

  • FOREACH clause was added in Memgraph 2.3. You need to upgrade Memgraph version to be 2.3 or higher.