Search code examples
oracleplsqlerror-handlingcursor

is There an oracle error code to raise when I finish a plsql block without close an explicit cursor?


I'm coding a lot of PL/SQL blocks using explicit cursors to fill some tables... So I need a "reminder" to close all cursors. So... Is there an Oracle error code to raise when I finish a plsql block without close an explicit cursor? Thanks


Solution

  • No, it's not. However cursors in anonymous block are automatically closed when the blocks finish. You should explicitly close the cursors though, as it is considered good practice.