已建立学生选课数据库,含学生、课程、选课三个表。
那就用当前时间减去20年,跟学生的生日比较
select * from stu where TRUNC(months_between(sysdate, birth)/12)>=20不知道你啥数据库,这个是oracle的写法