MySQL-将查询结果作为一张表再次进行查询

将查询结果作为一张表再次进行查询的方式

举例:

select name,age from
(select * from xxx) as temp
where age =21

说明:

将从xxx表中查出的结果作为一张新表temp然后再进行条件查询,注意要作为一张新表需要起别名,例如as temp

posted @ 2021-09-16 00:02  咖啡&牛奶  阅读(1961)  评论(0编辑  收藏  举报