=
pode ser usado quando a subconsulta retorna apenas 1 valor. Quando a subconsulta retornar mais de 1 valor, você terá que usar
IN
:select *
from table
where id IN (multiple row query);
Por exemplo:
SELECT *
FROM Students
WHERE Marks = (SELECT MAX(Marks) FROM Students) --Subquery returns only 1 value
SELECT *
FROM Students
WHERE Marks IN
(SELECT Marks
FROM Students
ORDER BY Marks DESC
LIMIT 10) --Subquery returns 10 values