shree11
shree11

Reputation: 535

Setting multiple values for a single property in neo4j

I'm using neo4j 2.1.2 community edition.

My query , can I add multiple values for single property.

Example , suppose i have a node called "11". 11 has properties called name - john, age-34, gender-m, phone_no- 1234,5678. So it has two values for phone_no. So how can i create a single node with properties name,age,gender and phone_no, where phone_no shuold have 2 values.

Normally will do it as(for single phone_no),

CREATE (n:Person{name:'john',age:34,gender:'m', phone_no:1234})

So for multiple phone_no, can i do as below:

CREATE (n:Person{name:'john',age:34,gender:'m', phone_no:1234,5678})

So how can i achieve it using cypher queries?

Thanks

Upvotes: 1

Views: 4505

Answers (1)

ulkas
ulkas

Reputation: 5918

using collections []

CREATE (n:Person{name:'john',age:34,gender:'m', phone_no:[1234,5678]})

Upvotes: 5

Related Questions