diff --git a/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md b/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md index 61f12418453..22c617b04e9 100644 --- a/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md +++ b/docs-2.0/3.ngql-guide/8.clauses-and-options/return.md @@ -129,9 +129,10 @@ nebula> MATCH (v:player{name:"Tim Duncan"}) \ ## 返回属性 -使用语法`{|}.`返回点或边的属性。 +使用语法`..`返回点的属性;使用语法`.`返回边的属性。 ```ngql +// 返回点的属性 nebula> MATCH (v:player) \ RETURN v.player.name, v.player.age \ LIMIT 3; @@ -144,6 +145,20 @@ nebula> MATCH (v:player) \ +------------------+--------------+ ``` +```ngql +// 返回边的属性 +nebula> MATCH (v:player{name:"Tim Duncan"})-[e]->() \ + RETURN e.start_year, e.degree \ ++--------------+----------+ +| e.start_year | e.degree | ++--------------+----------+ +| __NULL__ | 95 | +| __NULL__ | 95 | +| 1997 | __NULL__ | ++--------------+----------+ +``` + + 使用`properties()`函数返回点或边的所有属性。 ```ngql