Neo4j Create Relationship
In Neo4j to create relationship between nodes you have to use the CREATE statement like we used to create nodes. lets create relation between two already created nodes.
Example:
- Already created nodes:

- Query to create relation:
$ MATCH (a:GeeksforGeeks), (b:W3School) WHERE a.Name = "A Computer Science Portal" AND b.Name = "We are the Learner" CREATE (a)-[r:edutech]->(b) RETURN r
- Output of above query:

- Creating a new node:
$ CREATE (c:Company { Name: "Tuitorial" })Output:

- Creating relationship:
MATCH (a:GeeksforGeeks), (b:W3School), (c:Comapny) WHERE a.Tag = "A Computer Science Portal" AND b.Tag = "We are the Learner" AND c.Name = "Tuitorial" CREATE (c)-[pr:PRODUCED]->(b), (c)-[pr1:PROVIDER]->(a) RETURN a, b, c
Output:

Recommended Posts:
- SQL | CREATE
- Neo4j Drop Index
- Neo4j Introduction
- Neo4j Installation
- Neo4j Create Index
- Neo4j Create Node
- Neo4j Delete Node
- Neo4j Create Constraint
- Neo4j Query Cypher Language
- Neo4j | Naming rules and recommendations
- Neo4j | Values and Types
- JSON format in Cassandra
- Static type in Cassandra
- Batch statement in Cassandra
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
To create multiple relationship between nodes:
You can see how easy it is to continue creating more nodes and relationships between them. So we will create one more node and add two more relationships.


