At 15:18, 19990909, felix k sheng wrote:
>Select id, name, LEVEL
>from Tree
>START WITH pid=0 CONNECT BY pid=id
>
>And that will walk down arbitrary levels of relation and return it
>to you in some nice ordered fashion (note that LEVEL is a pseudocolumn
>that is automatically set to the depth of the current row).
Yes, I see how that is very useful. I suppose other vendors have their
own extensions for handling trees/graphs inside relational tables. I
suppose this could be done with a PROCEDURE in MySQL, but it'd be a bit
backwards (MySQL procedures work with the result set, they don't produce
the result set). It'd be better to work it into the language directly.
Tim