title: How do I check if table exists and it's not empty in one IF
body: <p>I've tried to do this:</p>
  
  <pre><code>if OBJECT_ID('a_b_Stage2_supA_demB') is not null
  and (select COUNT(*) from a_b_Stage2_supA_demB) &gt; 0
  </code></pre>
  
  <p>But SQL Server returns an error when <code>a_b_Stage2_supA_demB</code> does not exist, because it still tries to check second condition even though first side of "and" condition is already failed.</p>
  
  <p>Thanks for help!</p>