标签:table 个人 ble 根据 社保 oracle ora 基本 select
1.基本数据
SELECT * FROM TABLE_MUEN T
ID CODE NAME PARENTCODE
0 FIRST-SBZHYW 社保综合 ROOT
1 SECOND-SBZHYW-ZZYW 自助业务 FIRST-SBZHYW
2 THIRD-SBZHYW-YWCXYDY 业务查询与打印 SECOND-SBZHYW-ZZYW
3 FOUR-SBZHYW-GRCBZMDY 个人参保证明打印 THIRD-SBZHYW-YWCXYDY
2.SQL
SELECT CONNECT_BY_ROOT(ID),
CONNECT_BY_ROOT(T.CODE) CODE,
CONNECT_BY_ROOT(T.NAME) NAME,
CONNECT_BY_ROOT(T.PARENTCODE) PARENTCODE
FROM TABLE_MUEN T
WHERE T.CODE = ‘FOUR-SBZHYW-GRCBZMDY‘
CONNECT BY PRIOR T.CODE = T.PARENTCODE
标签:table 个人 ble 根据 社保 oracle ora 基本 select
原文地址:http://www.cnblogs.com/orac/p/7942758.html