qfedu-linux-advanced-level/day9/DQL/search12.sql

11 lines
184 B
MySQL
Raw Permalink Normal View History

use studb;
-- 显示年龄最大的前两位学生
-- 出去 NULL
select *
from t_stu
where birthday is not null
-- 年龄越大,出生日期越前
order by birthday asc
limit 0,2;