当前位置: 代码迷 >> SQL >> sql心得
  详细解决方案

sql心得

热度:56   发布时间:2016-05-05 14:27:10.0
sql经验

1.树

select 2009 + (level - 1) from dual connect by level <= 12

?

2.递归

找小弟
?select? *
from?? t_sys_org?? start?? with??? orgid in (select? orgid from?? t_sys_org?? where?? name ='广州技术开发服务中心')
? connect?? by?? prior?? orgid=orgpid


找大哥
select? *
from?? t_sys_org?? start?? with?? name ='广州技术开发服务中心'
? connect?? by?? prior?? orgpid=orgid? and orgpid = '9999999999999999999'

?

?

  相关解决方案