mysql 获取所有父级
with recursive t as
(
select * from jk_his_kszdb where sid = '114'
union all
select a.* from jk_his_kszdb a join t on a.sid = t.parent_id
)
select * from t
posted on 2022-05-14 16:02 zyp_java_net 阅读(272) 评论(0) 编辑 收藏 举报
with recursive t as
(
select * from jk_his_kszdb where sid = '114'
union all
select a.* from jk_his_kszdb a join t on a.sid = t.parent_id
)
select * from t
posted on 2022-05-14 16:02 zyp_java_net 阅读(272) 评论(0) 编辑 收藏 举报