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.

CREATE (node)

If I run this statement, it creates a node, but without the name node. It just gives it an ID number. What is the point of putting a name in the command if it doesn't even use the name?

2 REPLIES 2

Hello @eric-heim , welcome to the community

I would suggest starting Neo4j by reading at least these free courses from the academy:

1 - Overview of Neo4j 4.x
2 - Querying with Cypher in Neo4j 4.x

To answer your question, you are indeed creating a node with the CREATE (node) clause.
But in this case node is only a temporary variable to refer to your created node later in your queries.

What you wanted is probably CREATE (n:node) which will associate the label node to your created node. A label roughly indicate what type of node it is. If you want to add data to your node like an actual name it would be something like CREATE (p:Person {name: 'Bob'})

The courses above will unlock a lot of answers.

also its not clear from he original problem description what cypher was submitted but maybe his is an issue with the display of the node via the Neo4j Browser and what caption to place on the node. If thats the case see Browser operations - Neo4j Browser