Skip Headers

# Hierarchical Queries

Previous

Next

Hierarchical Queries is an Oracle Database mechanism that lets you select database rows based on hierarchical order. For example, you can design a query that reads the row of a given employee, followed by the rows of people this employee manages, followed by their managed employees, and so on.

To create a hierarchical query, use the `setHierarchicalQueryClause` method. This method takes three parameters, as follows:

    setHierarchicalQueryClause(startWith, connectBy, orderSibling)

This expression requires all three parameters, as described in the subsequent text.