文章目录
- oracle:
select trunc(months_between(SYSDATE, to_date('2008-04-30','yyyy-mm-dd')) / 12) years from table where column='×××';
- mysql
SELECT TIMESTAMPDIFF(year, "2011-03-30",NOW()) AS DATEDIFF FROM table WHERE column='×××';
版权声明:本文为dejuanZ原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。