title: how to convert varchar to bigint in mysql
body: <pre><code>DECLARE a_varchar_variable varchar(20) DEFAULT "999999999999999";
  DECLARE a_biginteger_variable BIGINT;
  </code></pre>
  
  <p>In my mysql stored procedure, this is working fine:</p>
  
  <pre><code>a_biginteger_variable = CONVERT(a_varchar_variable,UNSIGNED INT);
  </code></pre>
  
  <p>On the other hand, This gives a syntax error:</p>
  
  <pre><code>a_biginteger_variable = CONVERT(a_varchar_variable,BIGINT);
  </code></pre>
  
  <p>I would like to understand what causes this behavior. and how to convert varchar to bigint?</p>
  
  <p>It seems to be a repeating question on google but no answer found. which is weird because I though it should be easy.</p>