## Create
Create
CREATE (n:Node{id: 1})
RETURN n
Read
We can use the MATCH
clause to search the patterns. In order to get all Nodes that are labelled Node
, we can use the following cypher query:
MATCH (n:Node)
RETURN
Update
We can use SET
clause to update the property on the node or relationship
MATCH (n:Node)
SET n.modifiedAt = datetime()
RETURN n
Delete
We can use the DETACH DELETE
clause to delete a nodes and any relationships going or from it.
MATCH (n:Node{id: 1})
DETACH DELETE n
Reference
- CREATE - neo4j cypher user manual
- MATCH - neo4j cypher user manual
- SET - neo4j cypher user manual
- DELETE - neo4j cypher user manual
感謝您閱讀我的文章。歡迎隨時分享你的想法。