mysql查詢存儲(chǔ)地址,mysql遞歸查詢?
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 來實(shí)現(xiàn)遞歸
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 來實(shí)現(xiàn)遞歸