| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Other tree representations in SQL
: For postorder:
:
Of course, if [seq] always starts with 1, then we could use:
SELECT :my_root, T1.*
FROM Tree AS T1, Tree AS T2
WHERE T2.node = :my_root
AND T2.seq > T1.seq
AND T1.level > T2.level
AND T1.seq
>= COALESCE((SELECT MAX(T3.seq)
FROM Tree AS T3
WHERE T3.level = T2.level
AND T3.seq < T2.seq), 1);
regards,
Damjan S. Vujnovic
University of Belgrade
School of Electrical Engineering
Department of Computer Engineering & Informatics
Belgrade, Yugoslavia
http://galeb.etf.bg.ac.yu/~damjan/ Received on Wed Dec 04 2002 - 18:02:34 CST
![]() |
![]() |