title: Get difference in years between two dates in MySQL as an integer
body: <p>I am trying to calculate how old is a person in a database.<br>
  Let's suppose to have this simple table:  </p>
  
  <pre><code>student(id, birth_date);
  </code></pre>
  
  <p>Where id is the primary key (truly the table is more complex but I have simplified it).<br>
  I want to get how much old is a single person:</p>
  
  <pre><code>select id, datediff(curdate(),birth_date) 
  from student
  </code></pre>
  
  <p>But it returns a result in days, and not in years.I could divide it by 365:  </p>
  
  <pre><code>select id, datediff(curdate(),birth_date) / 365
  from student
  </code></pre>
  
  <p>But it returns a floating point value, and I want an integer.<br>
  So I could calculate the years:  </p>
  
  <pre><code>select id, year(curdate())-year(birth_date) 
  from student
  </code></pre>
  
  <p>But there is a problem: for instance now is May, if a person war born in June, 1970 he has still 31 years and not 32, but the expression returns 32.<br>
  I can't come out of this problem, can someone help me?</p>