Cypher - RETURN

檢索節點的某些屬性
檢索節點的全部屬性
檢索節點和關聯關係的某些屬性
檢索節點和關聯關係的全部屬性node

RETURN 
   <node-name>.<property1-name>,
   ........
   <node-name>.<propertyn-name>

//返回節點 /節點屬性spa

match(n:User)
where n.id = 1
return n,n.name

//返回關係 /  關係屬性排序

match (n:User)-[r]->(other:User)
where n.id = 1
return r , r.type
ip

//返回全部it

match(n:User),(u:User)
where n.id = 1 and u.id = 4
return *
im

//別名di

match(n:User)
where n.id = 1
return  n as admin
co

//去重block

match(n:User)
where n.id = 1
return distinct  n
去重

//其餘

match(n:User)
where n.id = 1

return  n,'is',(n)-->()

//限制,排序  當結果中包含了null 值時,升序null 在末尾。對於降序 null 在最前

match(n:User)
return  n
order by n.id
limit 1

//跳躍

match(n:User)
return  n
order by n.id desc,n.name skip 1 limit 5

相關文章
相關標籤/搜索