Suppose we wish to find the ID's of the employees that are managed by people who are managed by the employee with ID 123. Here are two possible queries: SELECT ee.empIDFROMEmps ee, Emps ffWHERE ee.mgrID = ff.empID AND ff.mgrID = 123;SELECT empIDFROM Emps WHERE mgrID IN SELECT empID FROM Emps WHERE mgrID = 123); Which, if any, of the two queries above will correctly (in SQL2) get the desired set of employee ID's?

🎲 Try a Random Question  |  Total Questions in Quiz: 20  |  🧠 Study this quiz with Flashcards
This question is part of a full practice quiz:
Database Management Systems: Relational Database Design — practice the complete quiz, review flashcards, or try a random question.


Suppose we wish to find the ID's of the employees that are managed by people who are managed by the employee with ID 123. Here are two possible queries: SELECT ee.empIDFROMEmps ee, Emps ffWHERE ee.mgrID = ff.empID AND ff.mgrID = 123;SELECT empIDFROM Emps WHERE mgrID IN SELECT empID <b>FROM Emps <b>WHERE mgrID = 123); Which, if any, of the two queries above will correctly (in SQL2) get the desired set of employee ID's?