title: Check if SELECT Returns Any Rows in Stored Procedure
body: <p>I'm writing a basic <code>SELECT</code> query, something like:</p>
  
  <pre><code>SELECT id, pname, pnumber 
  FROM tableName 
  WHERE pnumber IS NOT NULL
  </code></pre>
  
  <p>I'd like to then perform an <code>INSERT</code> by using the result of that <code>SELECT</code> like so:</p>
  
  <pre><code>IF {**the above SELECT query returned 0 rows**}
  BEGIN
      INSERT INTO tableName (pname,pnumber) VALUES ('bob', '38499483')
  END
  </code></pre>
  
  <p>My question is, how can I check for the <code>**the above SELECT query returned 0 rows**</code>?</p>