Last answered:

14 Mar 2022

Posted on:

19 Oct 2021

2

Why can't we just use IN?

SELECT
    *
FROM
    emp_manager
WHERE
    emp_no IN (SELECT
            manager_no
        FROM
            emp_manager);

Same result.

image.png

3 answers ( 0 marked as helpful)
Instructor
Posted on:

25 Oct 2021

1

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

Posted on:

28 Feb 2022

0

Understood. Thank you for your response.

Instructor
Posted on:

14 Mar 2022

0

You are very welcome!

Kind regards,
Martin

Submit an answer