title: Variable typecase in SQL using CAST operation
body: <p>I'm trying use CAST operation in SQL to get signed integers result from a VARCHAR.</p>
  
  <p>But i'm getting the same value as result instead of signed integer value.</p>
  
  <p>For eg:</p>
  
  <p>If the value is 65520, i was looking for the result of -16 by using <code>CAST( '65520' AS SIGNED INT)</code> in my select query. But i'm getting the same value 65520 again. </p>
  
  <p>Is there any other way to convert the VARCHAR to SIGNED INT using SQL.</p>
  
  <p>SQL Query:</p>
  
  <pre><code>SELECT CAST('65520' AS SIGNED INT);
  </code></pre>