WITH子句的递归查询 无 WITH RPL AS(SELECT FId,FNumber,FName,FManagerIdFROM T_PersonWHERE FManagerId IS NOT NULL)SELECT FId,FNumber,FName,FManagerId FROM RPL WITH RPL(FId,FNumber,FName,FManagerId) AS(SELECT FOOT.FId,ROOT.FNumber,ROOT.FName,RO
WITH子句的递归查询 <无> $velocityCount-->WITH RPL AS ( SELECT FId,FNumber,FName,FManagerId FROM T_Person WHERE FManagerId IS NOT NULL ) SELECT FId,FNumber,FName,FManagerId FROM RPL
WITH RPL(FId,FNumber,FName,FManagerId) AS ( SELECT FOOT.FId,ROOT.FNumber,ROOT.FName,ROOT.FManagerId FROM T_Person ROOT WHERE ROOT.FId='00001' UNION ALL SELECT CHILD.FId,CHILD.FNumber,CHILD.FName,CHILE.FManagerId FROM RPL PARENT,T_Person CHILD WHERE PARENT.FId=CHILD.FManagerId ) SELECT DISTINCT FId,FNumber,FName,FManagerId FROM RPL ORDER BY FManageId,FId,FNumber,FName
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com