select id,name,sex,birthday,address from test_table where birthday<date_sub(curdate(),interval 30 years);
查询大于30岁的人的数据。
--------------------------------------------------------------
DATE_SUB() 函数从日期减去指定的时间间隔。
------------------------------------------------------------------
curdate(),返回当前日期