求一个无限级树型结构树型结构是存储商品分类的[解决办法]
with cte as( select id from tb where pid=@id union all select a.id from tb a join cte b on a.id=b.pid)select * from cte