WITH
RPL (org_parent_id, orginfo_id, org_title) AS
(
SELECT
ROOT.org_parent_id,
ROOT.orginfo_id,
ROOT.org_title
FROM
jt_orgstructtree ROOT
WHERE
ROOT.org_parent_id = 'hello'
UNION ALL
SELECT
CHILD.org_parent_id,
CHILD.orginfo_id,
CHILD.org_title
FROM
RPL PARENT,
jt_orgstructtree CHILD
WHERE
PARENT.orginfo_id = CHILD.org_parent_id
)
SELECT DISTINCT
org_parent_id,
orginfo_id,
org_title
FROM
RPL
ORDER BY
org_parent_id,
orginfo_id,
org_title
db2 with as
最新推荐文章于 2023-07-23 19:04:22 发布