Definition:
WITH
- [RECURSIVE]
- cte_name
cte_namenames a single common table expression and can be used as a table reference in the statement containing the WITH clause
- [(col_name [, col_name] …)]
- AS (subquery)
- The
subquerypart ofAS (_subquery_)is called the “subquery of the CTE” and is what produces the CTE result set. - The parentheses following
ASare required.
- The
- [, cte_name [(col_name [, col_name] …)] AS (subquery)] …