cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Scape special characteres in nodename

Trying to create a node with "special character fails". Is there any way to create node with names with hyphens? Any way to scape the "-" ?

CREATE (bears-a:TEAM {val:"black"})

1 REPLY 1

you can do this thought its somewhat awkward but ...

 CREATE (`bears-a`:TEAM {val:"black"}) return `bears-a`.val;
+---------------+
| `bears-a`.val |
+---------------+
| "black"       |
+---------------+

1 row available after 168 ms, consumed after another 1 ms
Added 1 nodes, Set 1 properties, Added 1 labels

and enclosing the node name in back-ticks

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online