title: How do I cast a type to a bigint in MySQL?
body: <p><code>CAST()</code> seems to only work for BINARY,CHAR,DATE;DATETIME,DECIMAL,TIME,SIGNED,UNSIGNED.</p>
  
  <p>I need to convert a hex string to a bigint, that is, I'd want:</p>
  
  <pre><code>SELECT CAST(CONV("55244A5562C5566354',16,10) AS BIGINT)
  </code></pre>
  
  <p>CONV() returns a string, so that's why I'm trying the convert it. I have 2 uses for this</p>
  
  <ul>
  <li><p>Inserting data, e.g.    <code>INSERT INTO a(foo)  SELECT CONV(bar,16,10) FROM ...</code> Here foo is a bigint column, bar a varchar. Perhaps I could get away with the select statement being a string and let MySQL take care of it (?)</p></li>
  <li><p>Returning data where the client will dynamically learn the data type of the column, <code>SELECT CONV(bar,16,10)</code> is no good as the client will handle it as a string.</p></li>
  </ul>