Tips>>SQL |
|||||||||||||||||||||||||||||
MAKE FULL WEB APPLICATION WITH JUST SQL KNOWLEDGE? CLICK HERE SQL SUBQUERY It is very powerful and flexible feature of SQL. Through subqueries, we can embed a query within an update,delete or select statements.Sub Queries are useful where the desired output is based on some query or when we do not have the predefined list of values. The syntax of the select clause is to retrieve based on output of a subquery :-
Table Store_Information :-
Table Geography :-
and we want to use a subquery to find the sales of all stores in the South region. To do so, we use the following SQL statement :-
Result :-
In this example, instead of joining the two tables directly and then
adding up only the sales amount for stores in the South region, we first
use the subquery to find out which stores are in the South region, and
then we sum up the sales amount for these. If you don't find what you are looking for. Please click here to submit your query, our experts will reply soon. |
Terms and Conditions / Privacy Policy / Refund Policy / Shipping Policy