with a as(select * from table1 where parentid=0union allselect b.* from a,table1 b where a.id=b.parentid)select * from a用with as 来实现递归
Copyright © 广州京杭网络科技有限公司 2005-2025 版权所有 粤ICP备16019765号