Why can't we just use IN?
SELECT
*
FROM
emp_manager
WHERE
emp_no IN (SELECT
manager_no
FROM
emp_manager);
Same result.
3 answers ( 0 marked as helpful)
Hi Sachintha!
Thanks for reaching out.
Thank you for sharing your output with the Community!
As is the case for this task, sometimes there are several ways to obtain the desired answer. Nevertheless, this lecture is designed to explain the use of MySQL self-joins, hence the choice to use that technique for the solution of the given task.
Hope this helps.
Best,
Martin
Understood. Thank you for your response.
You are very welcome!
Kind regards,
Martin