title: Sort longtext as int in SQL
body: <p>I have table in MySQL database where one column type is longtext and there are stored numbers. I need to get content from table sorted by numbers in that column.</p>
  
  <pre><code>SELECT * FROM wp_postmeta WHERE meta_key = 'rating_avg' ORDER BY meta_value
  </code></pre>
  
  <p>With this query sorting is not proper and looks like:</p>
  
  <pre><code>0
  1.6
  10
  5
  </code></pre>
  
  <p>but I need like this:</p>
  
  <pre><code>10
  5
  1.6
  0
  </code></pre>
  
  <p>I may not change column type, because this column have many different types of data. Is there any possibility to change column type temporary in SQL query?</p>