用SQL查询年纪最小的前5名同学的学号,姓名,年龄。
select top 5 studentid,studentname,2021-year(birth) as 年龄
from student
order by 2021-year(birth) asc
2021-11-14
最新推荐文章于 2023-05-09 07:30:00 发布
用SQL查询年纪最小的前5名同学的学号,姓名,年龄。
select top 5 studentid,studentname,2021-year(birth) as 年龄
from student
order by 2021-year(birth) asc