Recursive Form
The WITH RECURSIVE statement modifier defines a named query that can refer to itself in the query definition and in the SELECT statement that it precedes. The named query list consists of at least one nonrecursive, or seed, statement and at least one recursive statement.
You can invoke a scalar UDF within the WITH RECURSIVE definition of a recursive query. The rules are the same as those for invoking a scalar UDF within a SELECT request.
Syntax Element … |
Specifies … |
query_name |
the name of the recursive query. |
column_name |
the name of a column in the named query definition. |
UNION ALL |
the operator that adds results of iterative operations to the named query. Because UNION ALL permits duplicate rows, it is not a true relational operator. |