Skip to content

Instantly share code, notes, and snippets.

@amilabandara
Created February 11, 2015 09:35
Show Gist options
  • Save amilabandara/00ecc35f51902c1a67ce to your computer and use it in GitHub Desktop.
Save amilabandara/00ecc35f51902c1a67ce to your computer and use it in GitHub Desktop.
mysql Essentials
#get age to current date
select timestampdiff(YEAR, dob, curdate()) AS age from table name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment