递归查询
select * from lacom a where banktype='02' start with a.agentcom='0202081584' Connect by prior a.upagentcom=a.agentcom ;
递归调用的用法:
select level,a.* from lacom a start with a.agentcom='0501010101001' connect by a.agentcom= prior a.upagentcom; -- 自底向上
select level,a.* from lacom a start with a.agentcom='0501' connect by prior a.agentcom= a.upagentcom ; -- 自顶向下