Difference between FETCH/FOR to loop a CURSOR in PL/SQL

后端 未结 4 1770
有刺的猬
有刺的猬 2020-12-25 08:35

I know that fetching a cursor will give me access to variables like %ROWCOUNT, %ROWTYPE, %FOUND, %NOTFOUND, %ISOPEN

...but I was wondering if there are any other rea

4条回答
  •  清歌不尽
    2020-12-25 09:30

    The OPEN / FETCH / CLOSE is called explicit cursor syntax; the latter is called implicit cursor syntax.

    One key difference you've already noticed is that you can't use %FOUND/%NOTFOUND/etc in implicit cursors... Another thing to be aware of is that implicit cursors are faster than explicit ones--they read ahead (~100 records?) besides not supporting the explicit logic.

    Additional info:

    • Implicit vs. Explicit Cursors

提交回复
热议问题