title: rowcount in Oracle
body: <p>I want to use the function SQL%ROWCOUNT as a way to tell me if a record is in a table or not.
  The code that I have is the following:</p>
  
  <pre><code>DECLARE
  v_emp employee%ROWTYPE; 
  CURSOR c_emp IS
  SELECT * FROM employee WHERE name='chuck';
  BEGIN
  OPEN c_emp;
  
      FETCH c_emp INTO v_emp;
      IF SQL%ROWCOUNT=1 THEN
               DBMS_OUTPUT.PUT_LINE('found');
              ELSE
                       DBMS_OUTPUT.PUT_LINE(TO_CHAR('not found'));
          END IF;
  END;
  </code></pre>
  
  <p>But it does not print anything at all, eventhough that record with that name exists in the database</p>
  
  <p>Thanks</p>