title: HAVING LENGTH(field) in MySQL
body: <p>I'm trying to select rows with field <code>timestamp</code>, which has a length shorter than 16 characters. I've tried the following: </p>
  
  <pre><code>SELECT LENGTH(timestamp), id
  FROM my_table
  HAVING LENGTH(timestamp) &lt; 16
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>&#35;1054 - Unknown column 'timestamp' in 'having clause'</p>
  </blockquote>
  
  <p>Any suggestions?</p>