title: Set the variable result, from query
body: <p>When I create the saved procedure, i can create some variable yes? for example:</p>
  
  <pre><code>CREATE PROCEDURE `some_proc` ()  
  BEGIN  
  
     DECLARE some_var INT; 
     SET some_var = 3;
  ....
  </code></pre>
  
  <p>QUESTION: but how to set variable result from the query, that is how to make some like this:</p>
  
  <pre><code>DECLARE some_var INT;
  SET some_var = SELECT COUNT(*) FROM mytable ;
  </code></pre>
  
  <p>?</p>