WITH clause
Description
Grammar Syntax
[ WITH [RECURSIVE] common_table_expression [, common_table_expression , ...] ]
--Where common_table_expression can be either non-recursive or recursive.
--Following is the non-recursive form:
CTE_table_name [ ( column_name [, ...] ) ] AS ( query )
--Following is the recursive form of common_table_expression:
CTE_table_name (column_name [, ...] ) AS ( recursive_query )Sample Source Patterns
Non-Recursive form
Input Code:
ORDER_ID
CUSTOMER_ID
ORDER_DATE
TOTAL_AMOUNT
Output Code:
ORDER_ID
CUSTOMER_ID
ORDER_DATE
TOTAL_AMOUNT
Recursive form
Input Code:
ID
NAME
MANAGER_ID
Output Code:
ID
NAME
MANAGER_ID
Known Issues
Related EWIs.
Last updated
