实战sql
with cte(UNIT_ID, UNIT_NAME, PARENT_UNIT_ID, UNIT_CODE ) as (select UNIT_ID, UNIT_NAME, PARENT_UNIT_ID , UNIT_CODEfrom HPFM_UNITunion allselect t.UNIT_ID, t.UNIT_NAME, t.PARENT_UNIT_ID, t.UNIT_CODEfrom HPFM_UNIT tjoin cte on t.PARENT_UNIT_ID = cte.UNIT_ID)select * from cte
[DB][ORACLE]SQL中使用WITH AS提高性能和可读性_oracle with as 性能慢-CSDN博客
Oracle with as 用法-CSDN博客