Browsed by
Category: Oracle

CONNECT BY basics

CONNECT BY basics

Source It builds a hierarchical query. There are 2 components to is: “start with” — this identifies all LEVEL=1 nodes in the tree “connect by” — describes how to walk from the parent nodes above to their children and their childrens children. Easiest to use an example on emp. If we start with “where mgr is NULL”, we generate the set of employees that have no mgr (they are the top of the tree). If we CONNECT BY PRIOR EMPNO…

Read More Read More

Bulk Processing with BULK COLLECT and FORALL

Bulk Processing with BULK COLLECT and FORALL

Source: https://blogs.oracle.com/oraclemagazine/bulk-processing-with-bulk-collect-and-forall In the previous article in this series, I introduced readers to PL/SQL collections. These data structures come in very handy when implementing algorithms that manipulate lists of program data, but they are also key elements in some of the powerful performance optimization features in PL/SQL. In this article, I will cover the two most important of these features: BULK COLLECT and FORALL. BULK COLLECT: SELECT statements that retrieve multiple rows with a single fetch, improving the speed of data…

Read More Read More