Question DB-SQL-0073
HardWhat does this query return for the table below?
Table emp:
| id | name | dept | salary | mgr |
|---|---|---|---|---|
| 1 | Anil | IT | 90000 | NULL |
| 2 | Bina | IT | 70000 | 1 |
| 3 | Chetan | HR | 50000 | 1 |
| 4 | Divya | IT | 70000 | 2 |
| 5 | Esha | HR | 65000 | 3 |
| 6 | Farhan | Sales | 55000 | 1 |
| 7 | Gita | Sales | 60000 | 6 |
| 8 | Hari | Sales | NULL | 6 |
SELECT name FROM emp WHERE mgr IN (SELECT id FROM emp WHERE mgr = 1) ORDER BY name;
- A.
Divya, Esha, Gita, Hari
- B.
Divya
- C.
Sign up free to see the answer and a step-by-step explanation.