tree

代码

倒树:  必须是  ‘子’
= prior ‘父’(本身start with 的该条记录关键字段,也就是start with Offspring = 'EVE'这条记录的offspring ( prior offspring )  )
  
  
select b.*level
    
from BREEDING b
   start 
with Offspring = 'EVE'
  connect 
by prior offspring = Cow
 
正树:  必须是  ‘父’
= prior ‘子’  (本身start with 的该条记录关键字段,也就是  start with Offspring = 'DELLA'这条记录的cow (prior Cow) )
    
select b.*level
    
from BREEDING b
   start 
with Offspring = 'DELLA'
  connect 
by prior Cow = offspring

 

posted on 2010-05-17 19:17  dolphin_bobo  阅读(161)  评论(0编辑  收藏  举报

导航