0
点赞
收藏
分享

微信扫一扫

#yyds干货盘点# 21 MySQL 子查询

犹大之窗 2022-03-17 阅读 32

子查询

一个查询的结果做为另一个查询的条件。

查询

select * from tbl_students 

where age = (select max(age)

from tbl_students );

最大学生的信息

#yyds干货盘点# 21 MySQL 子查询_子查询


查询黑龙江省的所有市

select * from areas where parent_id = (select id from areas where name = '黑龙江省');


举报

相关推荐

0 条评论