title: select into and add to current value of variable in stored procedure mysql
body: <p>I want to get sum of number of records in two tables in a variable. Following is the code:</p>
  
  <pre><code>declare v_sum int default 0;
  declare v_count2 int default 0;
  
  select count(*) into v_sum
  from table1;
  
  select count(*) into v_count2 
  from table2;
  
  set v_sum = v_sum + v_count2;
  </code></pre>
  
  <p>Is there any way to directly select and add the table2 count in <code>v_sum</code> without creating <code>v_count2</code> variable.</p>