title: User-defined Table Variables in MySQL 5.5?
body: <p>I've recently moved from MSSQL to MySQL. </p>
  
  <p>I would like to use a table variable (or equivalent) inside a MySQL 5.5 stored routine, to populate a dataset for an online report.</p>
  
  <p>In MS SQL, I would do it this way</p>
  
  <pre><code>...
  ...
  DECLARE @tblName TABLE
  WHILE &lt;condition&gt;
  BEGIN
      Insert Row based on iteration value
  END
  ...
  ...
  </code></pre>
  
  <p>From what I understand, I can't declare table variables in MySQL (correct me if I'm wrong) How do I implement the above logic in a MySQL stored procedure?</p>