SELECT LEVEL,
LPAD('*', 2 * LEVEL - 1, '*') || JG_MC,
SYS_CONNECT_BY_PATH(JG_MC||JG_id, '->')
FROM xt_jg
CONNECT BY PRIOR JG_ID = SJ_JG
START WITH SJ_JG = '000000'
ORDER BY LEVEL
SELECT LEVEL,
LPAD('*', 2 * LEVEL - 1, '*') || JG_MC,
SYS_CONNECT_BY_PATH(JG_MC||JG_id, '->')
FROM xt_jg
CONNECT BY PRIOR JG_ID = SJ_JG
START WITH SJ_JG = '000000'
ORDER BY LEVEL