WITH cte_name ( column_name [,...n] )
AS
(
CTE_query_definition –- Anchor member is defined.
UNION ALL
CTE_query_definition –- Recursive member is defined referencing cte_name.
)
-- Statement using the CTE
SELECT *
FROM cte_name
Thursday, June 4, 2009
The Perfect Solution for quering hierarical data
Recursive Queries Using Common Table Expressions
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment