orcle递归查询(START WITH) orcle递归seart with
SELECT DISTINCT
ORGANIZATION_ID AS ID,
ORGANIZATION_NAME AS TEXT,
NVL (PARENT_ID, 0) AS PID,
'' AS PS,
'' AS PN,
'' AS POST,
'' AS XB
FROM
TE_ORGANIZATION CONNECT BY PRIOR PARENT_ID = ORGANIZATION_ID START WITH ORGANIZATION_ID IN (
SELECT
A .ORGANIZATION_ID
FROM
TE_CUSTOMER A,
TR_PLATFORM_CUSTOMER B
WHERE
A.DEL_FLAG='0'
AND A .ORGANIZATION_ID IS NOT NULL
AND A .CUSTOMER_ID = B.CUSTOMER_ID
AND B.PLATFORM_ID = 2
)
AND DEL_FLAG = 0
ORDER BY CAST(ID AS INT)
上一篇: 独家 | 美团App内测“群聊”功能,王兴再次发力社交
下一篇: Java 二分查找算法的实现
推荐阅读
-
(转载)令人迷糊的Oracle递归查询(start with)
-
Oracle递归查询start with connect by prior的用法
-
orcle递归查询(START WITH) orcle递归seart with
-
orcle递归查询(START WITH) orcle递归seart with
-
oracel中递归查询父节点或者子节点start with connect by prior用法实例
-
(转载)令人迷糊的Oracle递归查询(start with)
-
Oracle递归查询(start with)
-
Oracle递归查询start with connect by prior的用法
-
start with connect by prior 递归查询用法
-
start with connect by prior 递归查询用法