return clauses

A return clause generates the result of the FLWOR expression.

The return clause is evaluated once for each tuple of variable bindings that is generated by the other clauses of the FLWOR expression. The order in which tuples of bound variables are processed by the return clause is non-deterministic unless the FLWOR expression contains an order by clause.

Tip: In return clauses, use parentheses to enclose expressions that contain top-level comma operators. Because FLWOR expressions have a higher precedence than the comma operator, expressions that contain top-level comma operators can result in errors or unexpected results if parentheses are not used.