with w_Storage_Depository as
(
select DID,DName,PID from Strorage_Depository where DID='A'
union all
select A.DID,A.DName,A.PID from Storage_Depository A, w_Storage_Depository B where A.PID=B.DID
)
select * from w_Storage_Depository
在那个引用的地方成递归调用的。
( select pid did from table where did ="a" ) /// 语句一
到那个引用的地方,就变成
( select pid did from table join on table.pid =( 语句一) .did ) /// 语句二
再递
selelct pid did form table join on table.pid =(语句二).did