title: Declare variable in stored procedure
body: <p>I have problem with declare variable in stored procedure. I used MySQL. My example code:</p>
  
  <pre><code>CREATE PROCEDURE `name`()
  BEGIN
      DECLARE varname INT;
  
      SELECT  * FROM `table` INTO var;
  END
  </code></pre>
  
  <p>MySQL returns error:</p>
  
  <blockquote>
    <p>error 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 '' at line 3</p>
  </blockquote>