Snippet Name: WITH with CONNECT BY
Description: The WITH query_name clause provides a way assign a name to a subquery block. The subquery block can then be referenced in multiple places in the query by specifying the query name. The query is optimized by treating it as either an inline view or as a temporary table.
COMMENT(S): Original code by Michel Cadot at comp.databases.oracle.misc
Note that you cannot nest this clause. That is, you cannot specify the subquery_factoring_clause within the subquery of another subquery_factoring_clause.
However, a query_name defined in one subquery_factoring_clause can be used in the subquery of any subsequent subquery_factoring_clause.
In a query with set operators, the set operator subquery cannot contain the subquery_factoring_clause, but the FROM subquery can contain the subquery_factoring_clause.
Also see: » AND Condition
» Distinct
» Having Clause
» EXISTS 2
» EXISTS
» WITH Clause: Single alias
» WITH Clause: Double alias
Comment: (none)
Language: PL/SQL
Highlight Mode: PLSQL
Last Modified: February 26th, 2009
|
|