Oracle recursive query example analysis start with connect by Hierarchical Queries. areaid,. name,. parentid,. levelcodeFrom prnbsn_area a www.2cto.com Start With. areaid = 3 Connect By Prior. areaid =. parentid this query will find all sub-regions in Chongqing from the bottom up query Select. areaid,. name,. parentid,. levelcodeFrom prnbsn_area aStart With. areaid = 78 Connect By Prior. parentid =. areaid query all the superiors of Sanya (78) www.2cto.com start: The condition of the root record (starting from that record) connect by: Specifies the relationship between the row of the parent record and the row of the Child record. In hierarchical query, the condition expression must use the prior operator to specify the row of the parent record, for example, connect by prior pid = id or connect by pid = PRIOR id. If the connect by condition is a combination condition, only one condition requires the prior operator, for example, connect by last_name! = 'King' and prior employee_id = manager_id however, connect by cannot contain subqueries. Prior is a binary operator.