0
我试图只显示20岁以上的人的结果,我会怎么做?我有代码显示年龄: 我试图使用if语句,但不太确定放置它的位置。如何细化年龄存储的程序查询结果
select idstaff, name, date_of_birth,
date_format(curdate(), '%Y') - date_format(date_of_birth, '%Y') -
(date_format(curdate(), '00-%m-%d') < date_format(date_of_birth, '00-%m-%d')) as age