Correlated subquery and non-correlated subquery: the query name nested in other queries. A subquery is also called an internal query, while an external query (also called a primary query) contains the subquery statement ). All subqueries can be divided into two types: correlated subqueries and non-correlated subqueries. 1> non-correlated subqueries are subqueries independent of external queries. A subquery is executed once in total, after the execution is complete, the value is passed to the external query. 2> the execution of related subqueries depends on the data in the external query. If one row is executed in the external query, the subquery is executed once. Therefore, non-correlated subqueries are more efficient than related subqueries. query the names of employees whose salaries are higher than the average salaries of all employees: -- SELECT department_id for non-correlated subqueries, FIRST_NAMEFROM EMPWHERE DEPARTMENT_ID = 110AND SALARY> (select avg (SALARY) from empwhere DEPARTMENT_ID = 110);-The subquery is an independent query that queries the names of employees whose salaries are higher than the average salaries of their respective departments: -- SELECT E1.DEPARTMENT _ ID, E1.FIRST _ namefrom emp E1WHERE SALARY> (select avg (SALARY) from emp E2WHERE E2.DEPARTMENT _ ID = E1.DEPARTMENT _ ID) -Depends on the external query result order by E1.DEPARTMENT _ ID;