摘要:
MySQL:1、select(date_format(from_days((to_days(now()) - to_days(birthday))),'%Y') + 0) AS age from table.2、selecttimestampdiff(YEAR,birthday,curdate()) AS age from tableSQLite:1、SELECT (strftime('%Y', 'now') - strftime('%Y', birthday)) - (strftime('%m-%d', ' 阅读全文