Binary Tree Nodes

  • + 0 comments

    I did almost as you did:

    select n, Case when level = 1 then 'Root' when connect_by_isleaf = 1 then 'Leaf' else 'Inner' end from bst connect by p = prior n start with p is null order by n;