Start With(树查询):
SELECT ... FROM table_nameWHERE + 条件3 START WITH + 条件1 CONNECT BY PRIOR + 条件2 --查询自身和子集 Select * From table_name WHERE id = '00001' or pid ='00001' Start With id = '00001' Connect By Prior id = pid
Start With(树查询):
SELECT ... FROM table_nameWHERE + 条件3 START WITH + 条件1 CONNECT BY PRIOR + 条件2 --查询自身和子集 Select * From table_name WHERE id = '00001' or pid ='00001' Start With id = '00001' Connect By Prior id = pid