All Products
Search
Document Center

PolarDB:Select root nodes

Last Updated:Mar 28, 2026

START WITH determines which rows in a hierarchical query serve as root nodes — the starting points from which PolarDB for Oracle builds each tree in the result set.

How it works

Any row in table_expression where start_expression is true becomes a root node. Each root node is the top of its own tree, so the number of trees in the result set equals the number of root nodes.

Default behavior when START WITH is omitted

If START WITH is omitted, every row returned by table_expression is treated as a root node of its own tree. The result set contains as many trees as there are rows.