CONNECT BY basics
Source It builds a hierarchical query. There are 2 components to is: “start with” — this identifies all LEVEL=1 nodes in the tree “connect by” — describes how to walk from the parent nodes above to their children and their childrens children. Easiest to use an example on emp. If we start with “where mgr is NULL”, we generate the set of employees that have no mgr (they are the top of the tree). If we CONNECT BY PRIOR EMPNO…