title: How to convert single precision floats saved as tinyblob back to single floats in MySql?
body: <p>In my MySQL table I have a field named <code>A</code> of type <code>tinyblob</code>. Data in every row is as long as 8 bytes. In these 8 bytes I store sequentially two single numbers.</p>
  
  <p>This is how I convert these two numbers in Matlab:</p>
  
  <p><code>typecast(reshape(single([1 8]),[],1),'uint8');</code></p>
  
  <p>Now I want to query some rows from my table using these <code>tinyblob</code>'s fields. </p>
  
  <p>Therefore, my question is: how do I cast first 4 bytes of this field into a <em>single(float)</em> number so that I could use this number in queries?</p>
  
  <p>So, I would expect something like this:</p>
  
  <pre><code>select * from table where first_4_bytes_of_A_to_single(A)&gt; 10
  </code></pre>
  
  <p>?</p>
  
  <p>I tried to use <code>cast</code> function. But either I'm using it wrong or this function is used for different purposes?</p>
  
  <p>Would this be possible?</p>
  
  <p>Thank you</p>