title: Getting ERROR 1064 (42000) while declaring a variable in mysql 5.7
body: <p>Im trying to declare a variable i mysql but strangely none of these commands are working. Ive snipped these commands from stackoverflow solved questions and while these seem to work for most of the people , its throwing same error on my system.</p>
  
  <pre><code>MySQL Server version: 5.7.26-0ubuntu0.18.10.1 (Ubuntu)
  &gt; declare  @d1  decimal(10,2)
  &gt; declare  d1   float(10);
  &gt; declare `d1`  BIGINT(2);
  &gt; declare  d1   INT;
  </code></pre>
  
  <p>All these are giving same error </p>
  
  <pre><code> ERROR 1064 (42000): You have an error in your SQL syntax; check the
   manual that corresponds to your MySQL server version for the right syntax
   to use
  </code></pre>
  
  <p>Also, this command print nothing for me, no error just blanks :-</p>
  
  <pre><code> -&gt; DECLARE @COURSE_ID INT
      -&gt; SELECT @COURSE_ID = 5
      -&gt; PRINT @COURSE_ID
      -&gt; 
      -&gt; ;
      -&gt; 
      -&gt; 
  </code></pre>