Answer the question
In order to leave comments, you need to log in
How to make a MySQL query with a selection of two values \u200b\u200bat once?
-------------------
| id_a | id_b |
-------------------
| 1 | 2 |
| 1 | 3 |
| 2 | 2 |
| 3 | 3 |
| 3 | 2 |
-------------------
Answer the question
In order to leave comments, you need to log in
I'm not strong, but I did it like this.
SELECT f.id_a
FROM test AS f
JOIN test AS s ON f.id_a = s.id_a
WHERE f.id_b = 2 AND s.id_b = 3;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question