I have a mySQL query with a subquery. this subquery:
(SELECT r.tlf_reserva
FROM eventos e
INNER JOIN Reservas r
INNER JOIN viajes v
WHERE r.id_viaje=v.id_propia AND e.id=1)
returns two values, but the query:
SELECT nombre
FROM tblRegistration
WHERE tlf= ALL(
SELECT r.tlf_reserva
FROM eventos e
INNER JOIN Reservas r
INNER JOIN viajes v
WHERE r.id_viaje=v.id_propia
AND e.id=1)
returns one value.
the two values are duplicate but I want to show them in the second query
No, since both the values are same (duplicates) and you are selecting single field; only one occurrence will be shown. If you still forcefully want to show then, you can use
UNION ALL
like