Sql生成Json型构造树文件
有兴趣的同学可以保存一份
//json文件的第一层ca31Array1
SELECT ‘{“label”:"’||LABEL||’",“id”:"’||ID||’",“haschild”:"’||haschild || ‘"},’ FROM (SELECT LEVEL lv, T.*
FROM CA11 T
START WITH PARENTID = ‘0000000’
CONNECT BY PRIOR ID = PARENTID
ORDER SIBLINGS BY ID) WHERE lv = ‘1’
原创
2020-12-15 21:15:39 ·
343 阅读 ·
0 评论