SELECT DATE_FORMAT(NOW(), '%Y') - DATE_FORMAT(dob, '%Y') - (DATE_FORMAT(NOW(), '00-%m-%d') < DATE_FORMAT(dob, '00-%m-%d')) AS age
More Related Contents:
- MySQL SELECT WHERE datetime matches day (and not necessarily time)
- MySQL Query – Records between Today and Last 30 Days
- Select mysql query between date?
- How do I get the first day of the week of a date in mysql?
- Compare only day and month with date field in mysql
- What is better subquery vs literal on IN clause in mysql
- SQL query return data from multiple tables
- Get a list of dates between two dates
- MySQL SELECT only not null values
- Difference between two dates in MySQL
- How do I select between the 1st day of the current month and current day in MySQL?
- MySQL SELECT increment counter
- MySQL select with CONCAT condition
- mysql: get record count between two date-time
- How to get first day of every corresponding month in mysql?
- How does MySQL’s ORDER BY RAND() work?
- MySQL INSERT INTO … VALUES and SELECT
- Mysql select distinct
- How to select one row randomly taking into account a weight?
- MySQL INNER JOIN select only one row from second table
- How to select only date from a DATETIME field in MySQL?
- Insert/ Update random date in MySQL
- What is the default MySQL JOIN behaviour, INNER or OUTER?
- MySQL : retrieve a large select by chunks
- MySQL – insert data from another table merged with constants
- How to compare timestamp dates with date-only parameter in MySQL?
- Insert data into table with result from another select query
- How to SELECT by MAX(date)?
- How to use Table output from stored MYSQL Procedure
- MySQL Select Multiple VALUES