|Oracle9i SQL Reference
Release 2 (9.2)
Part Number A96540-01
Functions, 36 of 177
DEPTH is an ancillary function used only with the
EQUALS_PATH conditions. It returns the number of levels in the path specified by the
UNDER_PATH condition with the same correlation variable.
correlation_integer can be any integer. Use it to correlate this ancillary function with its primary condition if the statement contains multiple primary conditions. Values less than 1 are treated as 1.
UNDER_PATH conditions can take two ancillary functions, one of which is
DEPTH. The following example shows the use of both ancillary functions. The example assumes the existence of the XMLSchema
warehouses.xsd (created in "Using XML in SQL Statements").