Monday, 19 July 2021

Neo4j : Return multiple nodes after creation

Syntax

CREATE (node1) (node2) RETURN node1, node2

 

Above statement create two nodes node1, node2 and return them.

 

Follow below steps to test above query.

 

Step 1: Open neo4j browser by hitting following url in browser.

http://localhost:7474/browser/

 


 

Step 2: Execute following queries in $ prompt.

CREATE (RamaKrishna:Person{name: "Rama Krishna", age: 32, city: "Bangalore", male: true}), (MuraliKrishna:Person{name: "Murali Krishna", age: 34, city: "Hyderabad", male: true}) RETURN RamaKrishna, MuraliKrishna

 


 

Previous                                                    Next                                                    Home

No comments:

Post a Comment