title: Getting a syntax error when declaring a table in SQL
body: <p>New to SQL and trying to run this code and I get the error &quot;#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@Qtable TABLE(Qid INT) END' at line 3&quot;.  The code runs fine if I take out the <code>DECLARE</code> statement;</p>
  <pre><code>SET @query_id = (SELECT ID from ua820988_dev.users WHERE `email` = 'example@gmail.com');
  CREATE PROCEDURE query_requests()
  BEGIN
      DECLARE @Qtable TABLE(Qid INT)
  END;
  SELECT * from ua820988_dev.requests WHERE `match` = @query_id;
  SELECT * from ua820988_dev.requests_archive WHERE `match` = @query_id;
  </code></pre>
  <p>I'm hoping to eventually put the results from the 2nd and 3rd <code>SELECT</code> statements into the table, but this is the watered down version for now just trying to get the code to run.  I'm running SQL 5.6 on MariaDB 10.2.</p>