title: How to select and insert values in mysql using stored procedures
body: <p>I am new in using stored procedures. I have this query that gets values from tables.</p>
  
  <p>After that, I need to insert the result to another table.</p>
  
  <p>Here's my query:</p>
  
  <pre><code>   SELECT a.gender, 
            b.purpose_abroad_as_per_recorded_travel, 
            b.country_name 
     FROM b   LEFT JOIN a
     ON b.person_id=a.id
  </code></pre>
  
  <p>and i am planning to insert all the results to table 'c'. </p>
  
  <p>How can i do the select and insert simultaneously using stored procedure? thanks</p>