You are viewing a single comment's thread. Return to all comments →
Using IF()
select bst.N, IF(bst.p IS NULL,'Root', IF(bst.n in (select bst.n from bst where bst.p is not null and n in (select p from bst)), 'Inner', 'Leaf')) from bst order by bst.N
Seems like cookies are disabled on this browser, please enable them to open this website
Binary Tree Nodes
You are viewing a single comment's thread. Return to all comments →
Using IF()