title: How to check empty table in sql query?
body: <p>I have two tables top1 and top2 .First I want to check top1 is empty or not.If top1 is not empty then truncate top2 and insert data from top1. Otherwise dont do any action .</p>
  
  <pre><code>CASE
  WHEN top1 is not empty THEN
   Truncate top2
    Insert from Top1
  
  END case
  </code></pre>