![](/img/trans.png)
[英]How to get different labels and their count in neo4j by cypher query?
[英]Neo4j cypher Query - How to get specific labels data?
我想使用密碼查詢僅獲取客戶和供應商名稱和ID。
"Match (n: customer:supplier) where has (n.ID) return n.ID,n.nme";
如何結合兩個標簽來獲取數據?
上面的查詢獲取語法錯誤。 請指教。
這用於OR標簽匹配:
MATCH (n)
WHERE (n:customer OR n:supplier) AND exists(n.ID)
RETURN n.ID, n.nme
這用於AND標簽匹配:
MATCH (n:customer:supplier)
WHERE exists(n.ID)
RETURN n.ID, n.nme
has()
函數早已被棄用並刪除。 改用exists()
。
此外,我不確定combine 2 labels to get the data.
是什么意思combine 2 labels to get the data.
現在的查詢將只與同時帶有:customer和:supplier標簽的節點匹配。 那是你要的嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.