Archive for March 20th, 2009
Hierarchical queries in MySQL: finding leaves
Comments enabled. I *really* need your comment
This is a series of articles on hierarchical queries in MySQL:
- Hierarchical queries in MySQL
- Hierarchical queries in MySQL: adding level
- Hierarchical queries in MySQL: adding ancestry chains.
- Hierarchical queries in MySQL: finding leaves
- Hierarchical queries in MySQL: finding loops
See also:
In this article, we will find the leaves of the hierarchy tree.
A row is a leaf in a hierarchy tree if it has no children.
In Oracle, there is a speical pseudocolumn that tests if a given row is a leaf in a CONNECT BY
query. Surprisingly, it's called CONNECT_BY_ISLEAF
.
Read the rest of this entry »