binary tree nodes
select N,
case when P is null then 'Root'
when N in (select distinct P from BST) then 'Inner'
else 'Leaf' end
from BST
order by N
'언어' 카테고리의 다른 글
round, ceil, floor, truncate (0) | 2024.06.11 |
---|---|
full outer join 불가능 (0) | 2024.06.10 |
last three characters (0) | 2024.06.05 |
정규표현식 필터링 (0) | 2024.06.05 |
체육복 여분이 있어도 도난을 당하다니 (0) | 2024.02.22 |