Excluding label names in simple Neo4j Query

依然范特西╮ 提交于 2020-12-04 15:24:42

问题


Usually I can find everything I need already on SO but not this time. I'm looking for a very simple way to exclude labels, for example (pseudo code):

match (n) where n not in (Label1, Label2) return n

Sorry about crappy query. In short I have labels x,y,z and I want to return all of them apart from z.

Thnx!


回答1:


This should do it:

MATCH (n)
WHERE NOT n:Label1 AND NOT n:Label2
RETURN n;


来源:https://stackoverflow.com/questions/32817075/excluding-label-names-in-simple-neo4j-query

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!