Inner query is nothing but sub query. i.e., query within another query. The outer query is also known as main query which is written in the outer. For ex: select * from employees where dept_id = (select dept_id from dept where emp_id = 100) In the above example, I just wanna show all employees who are working with emp_id 100. So first it will bring the result of the inner query which returns the dept_id of the employee 100 and then goes to outer query returns all the employee details who are coming under the same dept.