子查询(Subquery)是指出现在其他SQL语句内的SELECT子句. 例如: select * from t1 where col1=(select col2 from t2); 其中select * from t1,称为Outer Query/Outer Statement(外层查询) select col2 from t2,称为SubQuery(子查询) 子查询必须嵌套在查询内部,且必须始终出现在圆括号内 子查询可以包含多个关键字或条件, 如distinct group by order…