sql遞歸函數(shù)start with mysql遞歸查詢,不用存儲過程?
mysql遞歸查詢,不用存儲過程?with a as(select * from table1 where parentid=0union allselect b.* from a,table1 b
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 來實現(xiàn)遞歸