对于数据库字段birthday varchar需在时间计算中转化为timestape格式,并进行计算
具体sql如下:
select 1 where EXTRACT(YEAR FROM age(now(), to_timestamp(‘2000-01-01’, ‘YYYY-MM-DD’)))>10;
对于数据库字段birthday varchar需在时间计算中转化为timestape格式,并进行计算
具体sql如下:
select 1 where EXTRACT(YEAR FROM age(now(), to_timestamp(‘2000-01-01’, ‘YYYY-MM-DD’)))>10;