Search code examples
memgraphdb

How can I create a node in Memgraph using Cypher that has more than one label?


I know that I can create a node with a label using the code:

CREATE (n:Person)
RETURN n;

But how can I add multiple labels at the time of creating?


Solution

  • If you wish to add multiple labels to a node when creating it do the following:

    CREATE (n:Person:Department)
    RETURN n;