neo4J Query Notes

Submitted by code_admin on Thu, 10/25/2018 - 10:10
  1. :help
  1. CREATE
  2. (RobertMetcalf:Person { name:'Robert Metcalf', email:'aa@bb.com', phone:'012345'}),
  3. (ALMA:System { name:'ALMA'})
  1. MATCH (n:System) return n
  1. MATCH (n:System) delete n
  1. MATCH (p:Person),(t:Team) WHERE p.name='Robert Metcalf' CREATE (p)-[r:MemberOf]->(t)

Check for missing property

  1. MATCH (p)-[r:MemberOf]-(t) WHERE NOT EXISTS(t.name) return t

Add a property

  1. MATCH (n:User)
  2. SET n.surname = 'Taylor'
  3. RETURN n
RJM Article Type
Quick Reference