I have a query
SELECT name FROM people WHERE age IN ('34','34')
There is only one row with column age
of 34, but I want to return that row 2 times since 34 appears twice in the array.
Any solutions?
I have a query
SELECT name FROM people WHERE age IN ('34','34')
There is only one row with column age
of 34, but I want to return that row 2 times since 34 appears twice in the array.
Any solutions?
2
Answers
You can use
union all
to make the union of two request.In your case it would be :
Or make it a rare usage of
NATURAL JOIN
: