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