title: How do I check whether data is there or not in more than one sql table in one script?
body: <p>I have more than 3 sql tables.</p>
  
  <p>now i'm trying to <code>select count(*)</code> from all tables but how can i do this?.</p>
  
  <p>I want to know whether data is present in all tables or not</p>
  
  <p><code>I need to check the row count from previous business day ~15% for any table and it sends an email alert</code></p>
  
  <p>I tried like following please help me to complete</p>
  
  <pre><code>PROCEDURE [dbo].[SendEmail_WSOTableDataAlert]
  AS
  BEGIN
  
  declare @err int
  IF NOT EXISTS (select 1 from T1) OR
  NOT EXISTS (select 1 from T2)
  BEGIN
  set @error=1
  END
  
  //here i need to show which table is having empty data how can i do this please help
  
  SET @tableHTML = @tableHTML +  +
              '&lt;/TABLE&gt;' + @EmailFooter;
  
  
  
  @error =1
  
  then
  </code></pre>
  
  <p>send mail</p>
  
  <pre><code>END
  </code></pre>