You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/clauses/union.adoc
+6-1Lines changed: 6 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -131,10 +131,15 @@ The combined result is returned, without duplicates.
131
131
The `UNION` clause can be used within a xref:subqueries/call-subquery.adoc[`CALL` subquery] to further process the combined results before a final output is returned.
132
132
For example, the below query xref:functions/aggregating.adoc#functions-count[counts] the occurrences of each `name` property returned after the `UNION ALL` within the `CALL` subquery.
133
133
134
+
[NOTE]
135
+
The below query uses an empty xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause]: `CALL () { ... }` (introduced in Neo4j 5.23).
136
+
If you are using an older version of Neo4j, use `CALL { ... }` instead.
137
+
For more information, see xref:subqueries/call-subquery.adoc#import-variables[CALL subqueries -> Importing variables].
Copy file name to clipboardExpand all lines: modules/ROOT/pages/clauses/use.adoc
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,13 +41,14 @@ USE <graph>
41
41
+
42
42
[source, syntax, role="noheader"]
43
43
----
44
-
CALL {
44
+
CALL () {
45
45
USE <graph>
46
46
<other clauses>
47
47
}
48
48
----
49
49
+
50
-
In subqueries, a `USE` clause may appear as the second clause, if directly following an xref::subqueries/call-subquery.adoc#call-importing-variables[importing `WITH` clause].
50
+
In subqueries, a `USE` clause may appear directly following the xref:subqueries/call-subquery.adoc#variable-scope-clause[variable scope clause]: `CALL () { ... }` (introduced in Neo4j 5.23).
51
+
Or, if you are using an older version of Neo4j, directly following an xref::subqueries/call-subquery.adoc#importing-with[importing `WITH` clause].
51
52
52
53
When executing queries against a composite database, the `USE` clause must only refer to graphs that are part of the current composite database.
0 commit comments