with [recursive] as(
----------------------
--資料來源 begin
----------------------
Select field1 , field2
From Table a
Where field1 = 1
--------------------
--資料來源 end
-------------------
Union All
Select b.field1, b.field2
From Table b
Join [recursive] on b.field2 = [recursive].fied01
)
select * from [recursive]
沒有留言:
張貼留言