Skip to content

Commit df08c0c

Browse files
committed
clarification wrt. subqueries
1 parent 82aa6c7 commit df08c0c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

modules/ROOT/pages/syntax/variables.adoc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ Information regarding the naming of variables may be found xref::syntax/naming.a
2424
.Variables are only visible in the same query part
2525
====
2626
Variables are not carried over to subsequent queries.
27-
If multiple query parts are chained together using `WITH`, variables have to be listed in the `WITH` clause to be carried over to the next part.
27+
If multiple query parts are chained together using `WITH`, variables defined in one part have to be listed in the `WITH` clause to be carried over to the next part.
2828
For more information see xref::clauses/with.adoc[WITH].
2929
====
3030

31+
[IMPORTANT]
32+
.Variables imported into a `CALL` subquery are visible in the whole subquery
33+
====
34+
Even if the subquery is a multiple query parts are chained together using `WITH`, variables imported from the outer query do not have to be listed in the `WITH` clause to be visible in the next part.
35+
For more information see xref::subqueries/call-subquery.adoc#variable-scope-clause[The variable scope clause].
36+
====

0 commit comments

Comments
 (0)