SQL SELF JOIN – A Solution without JOIN
Regarding the lecture about SELF JOINs I was wondering if the JOIN clause is necessary.
Following logic in the last solution using WHERE IN I created a query as follows:
emp_no IN (SELECT
The connection is also only in two rows of interest and the result is same.
Is this solution correct? Are there some cases, in which SELF JOIN would be necessary?
Why do we use a self-join in this lecture? Because we wanted to teach you how to use this tool. Otherwise, it is true that sometimes identical output can be obtained by using different queries. Hope this helps.