title: what is the default value of %NOTFOUND in cusor attribute?
body: <p>I am studying PL/SQL cursors. I have a problem with a cursor attribute. What a default value for <code>%FOUND</code>, <code>%NOTFOUND</code> in implicit and explicit cursors?</p>
  
  <p>I am going through the PDF I found this sentence </p>
  
  <pre><code>LOOP
  FETCH c1 INTO my_ename, my_sal, my_hiredate;
  EXIT WHEN c1%NOTFOUND;
  ...
  END LOOP;
  </code></pre>
  
  <p><strong>Before the first fetch, %NOTFOUND evaluates to NULL.</strong> So, if FETCH never executes successfully, the loop is never exited. That is because the EXIT WHEN statement executes only if its WHEN condition is
  true. To be safe, use the following EXIT statement instead:</p>
  
  <pre><code>EXIT WHEN c1%NOTFOUND OR c1%NOTFOUND IS NULL;
  </code></pre>
  
  <p>If a cursor is not open, referencing it with <code>%NOTFOUND</code> raises <code>INVALID_CURSOR</code>.</p>