REMOVE用来移除属性和标签
DELETE用来删除节点和关系
CREATE (:Person:Actor:Director {name: '周星驰', born: 1962})
CREATE (:Person:Actor {name: '吴孟达', born: 1952})
MATCH (p1:Person{name:'周星驰'}), (p2:Person{name:'吴孟达'})
CREATE (p1)-[:KNOWS{since:[1980]}]->(p2)
MATCH (a {name: '周星驰'})
REMOVE a.born
RETURN a.name, a.born
│"a.name"│"a.born"│
╞════════╪════════╡
│"周星驰" │null │
MATCH (n {name: '吴孟达'}) REMOVE n:Actor RETURN n.name, labels(n)
│"n.name"│"labels(n)"│
╞════════╪═══════════╡
│"吴孟达" │["Person"] │
MATCH (n {name: '周星驰'}) REMOVE n:Actor:Director RETURN n.name, labels(n)
"n.name"│"labels(n)"│
╞════════╪═══════════╡
│"周星驰" │["Person"] │
MATCH (n:Person) RETURN n LIMIT 25
鼠标点击到KNOWS这个关系上,看到有个属性since [1980]
MATCH (n {name:'周星驰'})-[r:KNOWS]->()
REMOVE r.since
RETURN r
返回
{
"identity": 0,
"start": 2,
"end": 3,
"type": "KNOWS",
"properties": {
}
}