摘要: 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', ' 阅读全文
posted @ 2014-03-15 11:09 半瓶子水 阅读(1123) 评论(0) 推荐(0) 编辑