sql获取本身及后代节点数据

tech2022-07-10  130

sql获取本身及后代节点数据 with #tmp as( select * from PRD_DW where DWBH in(‘01’) union all select a.* from PRD_DW a, #tmp b where a.PARENTID = b.DWBH and a.PARENTID!=a.DWBH and b.PARENTID!= b.DWBH ) select distinct DWBH from #tmp

最新回复(0)