title: select into and if statements
body: <p>So, I have been trying to get this to work. I'm just frustrated I can't figure out what I am doing wrong.  I am trying to declare the variable num and insert a value into it using a select into statement with count.  After that I want to do a simple if statement that will run an update or delete based off of the outcome. I'm relatively new to Oracle Pl/SQL, so any help would be greatly appreciated. Thanks</p>
  
  <pre><code>DECLARE
     num   number;
  BEGIN
     SELECT COUNT (*)
       INTO num
       FROM csteinkamp.gai
      WHERE breed_ref_id = 455;
  
     IF (num &gt; 5)
     THEN
        UPDATE csteinkamp.gai
           SET animal_nm = 'TEST'
         WHERE breed_ref_id = 455;
     ELSE
        DELETE FROM csteinkamp.gai
              WHERE breed_ref_id = 455;
     END;
  </code></pre>