Skip to content

Commit 6cb07e5

Browse files
committed
review suggestion
1 parent a3ee243 commit 6cb07e5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/ROOT/pages/queries/composed-queries/sequential-queries.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,9 @@ RETURN customer.firstName AS chocolateCustomer,
135135

136136
[NOTE]
137137
====
138-
When followed by a `NEXT` clause, expressions in a `RETURN` clause must either be variables that have been introduced before or they must be aliased with `AS`.
138+
When followed by `NEXT`, a `RETURN` clause may only contain variables or aliased expressions.
139+
Literals or unaliased expressions are not allowed.
140+
For example, `RETURN 1` and `RETURN 1 + 1` cannot precede `NEXT`, but `RETURN 1 AS one` and `RETURN 1 + 1 AS two` can."
139141
====
140142

141143
Variables which are local to a query and which are not explicitly returned are not accessible by subsequent queries in the context of `NEXT`. This allows you to control variable scope similarly to what you can do with `WITH`, see xref:clauses/with.adoc#variable-scope[Control variables in scope].

0 commit comments

Comments
 (0)