17,086
社区成员
发帖
与我相关
我的任务
分享
select dept_name from (select t.dept_id, t.dept_name, t.dept_code, t.par_dept_id, level
from SYS_DEPT t
start with t.dept_id = '40288ac45a3c1e8b015a3c28b4ae01d6'
connect by prior t.dept_id = t.par_dept_id
order by level, t.dept_code) order by level
select COLUMN1
from test_insert3
start with COLUMN1 = 'T_A'
connect by prior COLUMN2 = COLUMN1
UNION
select COLUMN2
from test_insert3
start with COLUMN1 = 'T_A'
connect by prior COLUMN2 = COLUMN1
with tab1 as (
select table_id1, table_id2
from table_a
start with table_id1 = 'TABLE_A'
connect by prior table_id2 = table_id1
)
select table_id1 from tab1
union
select table_id2 from tab1
order by table_id1
;