Last answered:

09 Apr 2020

Posted on:

08 Apr 2020

0

Use of SQL subquery and Join

SQL Subqueries Video 1   Instead of using SQL subquery I used JOIN query which gave the same output. ALso the JOIN syntax was much simpler to use. Then why Subquery is required?
1 answers ( 0 marked as helpful)
Instructor
Posted on:

09 Apr 2020

1
Hi Neelanjan! Thanks for reaching out! Although it is true sometimes one can obtain the same ouptut by using different SQL tools, there are many situations in which a join won't be able to deliver the same result as a subquery, therefore you need to be well prepared on how to use a subquery in MySQL. That's why we teach it and it is important to focus on the structure of using subqueries (as you can see, there are several types of subqueries and they are not in any way completely identical in terms of purpose for use!). Hope this helps.
Best,
Martin

Submit an answer