MySQL-将查询结果作为一张表再次进行查询
将查询结果作为一张表再次进行查询的方式
举例:
select name,age from
(select * from xxx) as temp
where age =21
说明:
将从xxx表中查出的结果作为一张新表temp然后再进行条件查询,注意要作为一张新表需要起别名,例如as temp
select name,age from
(select * from xxx) as temp
where age =21
将从xxx表中查出的结果作为一张新表temp然后再进行条件查询,注意要作为一张新表需要起别名,例如as temp