with v_bm_dict_lab as(select *,cast(id as int ) px,cast(id as int ) px2 from BM_DICT_Lab where pid=0 union all select a.*,b.px,b.px2+ltrim(a.id) from BM_DICT_Lab a join v_bm_dict_lab b on a.pid=b.id )select * from v_bm_dict_lab order by px,px2
sqlserver树形显示
最新推荐文章于 2021-05-27 13:06:51 发布