title: How to find select result in stored procedure
body: <pre><code>select count(*) into dup_row_count from tablea ;
  
  if dup_row_count is not null then
    total_row_count :=1;
  else
    total_row_count :=2;
  end if;
  </code></pre>
  
  <p>In above query if there is no data present in select statement then if else condition not working.</p>
  
  <p>Please can you help me in how to find select query gives any result or not so that on that basis I can change my if else condition.  (Oracle database - stored procedure)</p>