1. Recursive down
SELECT * FROM table_name where condition connect by prior BMBM (This level association condition) =SJBMBM (Parent association condition ) Start with BMBM (This level association condition) = ' 610000000 000 ' (This level encoding)--includes this level
SELECT * FROM table_name where condition connect by prior BMBM (This level association condition) =SJBMBM (Parent association condition ) Start with SJBMBM (This level association condition) = ' 6100000 00000 ' (This level encoding)--does not include this level
2. Recursion Upward
SELECT * FROM table_name where condition connect by prior SJBMBM (Parent association condition) =BMBM (This level association condition) Start with BMBM (This level association condition) = ' 610528000 000 ' (This level encoding)--includes this level
SELECT * FROM table_name where condition connect by prior SJBMBM (Parent association condition) =BMBM (This level association condition) Start with SJBMBM (This level association condition) = ' 6105280 00000 ' (This level encoding)--Includes subordinates
Note: The difference between upward recursion and downward recursion lies in the difference in the order of the Intermediate association conditions, noting that the meaning of the start with condition is also different.
Upward recursion and downward recursion in 3.sql