1. 根据节点属性查找对应节点:
其他例子:
match(x:Student{studentId:'1001'}) return x 或者
match(x:Student) where x.studentId='1001' return x
我的例子:

2. 根据关系查找节点
其他例子:
match (x)-[r:教学内容]-(y) where r.课程='语文' return x,r,y
我的例子:
match p=(n:`药品`)-[r:`诊断禁忌`]-(d:`诊断`{name:'痛风'}) return p limit 25
用p来代表一个三元组,return p等价于 return x, r, y
3. 查询单独的节点,即:与其他任何节点没有任何关系
match(x) where not (x)-[]-() return x
4. 查询N层关系的节点:
其他例子:
match q=(x)-[*5..8]-() return q limit 200 这个为查询5到8层关系的
match q=(dh)-[r]-(jq)-[rr]-()-[]-()-[]-()-[]-()-[]-()-[]-() return q limit 400
我的例子:
这个不太好理解,我们可以对比着看:
1层关系

最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



