# 查询出所有比赵六入学晚的学生信息
# 子查询
select createDate from student where userName='赵六';
# 父查询
select
*
from student # 写注释非常方便
where
createDate>(
select
createDate
from student
where
userName='赵六' # 子查询
);
MySQL父查询和子查询
最新推荐文章于 2024-07-11 16:26:04 发布