0
点赞
收藏
分享

微信扫一扫

mysql 树形查询 结果

juneyale 2022-09-26 阅读 126


​​

mysql  树形查询  结果_jaava

​​

with recursive t1(id, parent_id) as (
select*from blog_temp.etc_test t0 where t0.parent_id is null -- Anchor member.
union all
select t2.id, t2.parent_id from blog_temp.etc_test t2, t1 -- Recursive member.
where t2.parent_id = t1.id
)
select lpad(codename,(length(codename)+v.dict_level*4),' ') codename1 ,lpad(id,(length(id)+v.dict_level*4),' ') id1 , v.*
from tree_dict v ;

​​

mysql  树形查询  结果_jaava_02

​​

为人:谦逊、激情、博学、审问、慎思、明辨、 笃行
学问:纸上得来终觉浅,绝知此事要躬行
为事:工欲善其事,必先利其器。
态度:道阻且长,行则将至;行而不辍,未来可期
.....................................................................
------- 换了个头像,静静的想,默默的思恋,一丝淡淡的忧伤 ----------
------- 桃之夭夭,灼灼其华。之子于归,宜其室家。 ---------------
------- 桃之夭夭,有蕡其实。之子于归,宜其家室。 ---------------
------- 桃之夭夭,其叶蓁蓁。之子于归,宜其家人。 ---------------
=====================================================================



举报

相关推荐

0 条评论