sql递归函数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 来实现递归