``++cursor%NOTFOUND++`` is clearer and more readable than ``++NOT cursor%FOUND++``, and is preferred.


== Noncompliant Code Example

----
SET SERVEROUTPUT ON

DECLARE
  CURSOR c IS SELECT DUMMY FROM DUAL;
  x VARCHAR2(1);
BEGIN
  OPEN c;
  FETCH c INTO x;
  IF NOT c%FOUND THEN  -- Noncompliant
    DBMS_OUTPUT.PUT_LINE('uh?');
  ELSE
    DBMS_OUTPUT.PUT_LINE('all good: ' || x);
  END IF;
  CLOSE c;
END;
/
----


== Compliant Solution

----
SET SERVEROUTPUT ON

DECLARE
  CURSOR c IS SELECT DUMMY FROM DUAL;
  x VARCHAR2(1);
BEGIN
  OPEN c;
  FETCH c INTO x;
  IF c%NOTFOUND THEN 
    DBMS_OUTPUT.PUT_LINE('uh?');
  ELSE
    DBMS_OUTPUT.PUT_LINE('all good: ' || x);
  END IF;
  CLOSE c;
END;
/
----


ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)

include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]
