WITH TEMP AS
(
SELECT * FROM t_sys_org WHERE ID='0' --表的ID
UNION ALL
SELECT T0.* FROM TEMP,t_sys_org T0 WHERE =T0.parent_id --子级ID==父级ID
)
SELECT * FROM TEMP;
WITH TEMP AS
(
SELECT * FROM t_sys_org WHERE ID='91a9c11e-346c-49ef-93c7-d0069d33c6f3' --表的ID
UNION ALL
SELECT T0.* FROM TEMP,t_sys_org T0 WHERE TEMP.parent_id= --父级ID==子级ID
)
SELECT * FROM TEMP;