Source: https://dev-docs.yueshu.com.cn/v5.3.2/database-gql-reference/dql/clauses/yield/ Documentation version: v5.3.2 # YIELD `YIELD`子句用于选定或重命名后续语句使用的列。 ## 语法 语法图源码 yield_clause ```` yield_clause ::= 'YIELD' yield_item_name ( 'AS' variable )? ( ',' yield_item_name ( 'AS' variable )? )* ```` ## 参数 ### `yield_item_name` 选定的列的名称。 ### `variable` 选定的列的别名。`variable`可以是常规标识符或使用反引号(```)包围的分隔标识符。有关标识符的更多信息,请参见[标识符命名规则](https://dev-docs.yueshu.com.cn/v5.3.2/database-gql-reference/overview/keywords-identifiers/#_3)。 ## 示例 ## 选择并重命名列 ```` ''' CALL show_graphs() YIELD graph_type, name AS graph_name RETURN graph_type, graph_name ''' ```` 上述语句执行以下操作: 1. 调用过程`show_graphs()`获取有关图的信息。更多信息,请参见[使用 CALL 调用命名过程](https://dev-docs.yueshu.com.cn/v5.3.2/database-gql-reference/dql/call/call-procedure/)。 2. 使用`YIELD`子句选择列`graph_type`和`name`,并将列`name`重命名为`graph_name`。 3. 返回列`graph_type`和`graph_name`。 返回: ```` +--------------+------------+ | graph_type | graph_name | +--------------+------------+ | movie_type | movie | +--------------+------------+ ````