|
|
FULL A - Z Oracle Function Library (formerly named "Morgan's Library")
Term: START WITH CONNECT BY
Definition: (START WITH condition_1) CONNECT BY condition_2 The START WITH clause is optional. It specifies the rows that are the root(s) of the hierarchical query. If this clause is omitted Oracle uses all rows in the table as root rows. The START WITH condition can contain a subquery but cannot contain a subquery expression. The CONNECT BY clause defines the relationship between the parent rows and the child rows of the hierarchy. The connect_by_condition can be any condition or predicate, but it must use the PRIOR operator to refer to the parent row. Example Usage: SELECT user_id, last_name, manager_id, LEVEL This will return the user_id, last_name, manager_id and the level in the tree for the user hierarchy.
|
Home | Search | Code Library | Sponsors | Privacy | Terms of Use | Contact Us | © 2003 - 2025 psoug.org |