What is sub-query ?
Sandeep Kumar
A select statement return to another select statement is called Subquery
With in the from cluase write a select or update or delete operation perfom that is sub querywith in the query call a another query is nothing but sub query
Sub-query is part of main query and first execute sub-query this output going to input of main query.
A subquery is a SQL query within a query.Subqueries are nested queries that provide data to the enclosing query.Subqueries can return individual values or a list of records Subqueries must be enclosed with parenthesis
sub query is also known as nested query. the query within another query using WHERE clause
Sub query is the query that is written within another query and its output serves as input to outer query . like 2 tabal ----emp_mst and emp_d_mast emp_mst ----emp_id p.key and emp_name emp_d_mst -----emp_id f.key and emp_salary then select emp_salary from emp_d_mst where emp_id = (select emp_id from emp_mst where emp_name = "jay pathak")
Sub query is the query that is written within another query and its output serves as input to outer query .
a subquery is also called an INNER QUERY or INNER SELECT. the main query that contains the subquery is also called the OUTER QUERY or OUTER SELECT.
Query inside query is known as sub-query.There will be two query inner query and outer query.In which inner query get execute first then outer query get executed