I have a table like this:
-------------
| id | A |
-------------
| 1 | 2 |
| 1 | 5 |
| 1 | 6 |
| 2 | 6 |
| 2 | 9 |
-------------
How can I select all ids that have values of A that don’t contain certain numbers, like I don’t want any id that have A IN (9,-1,20), for example?
Thank you!
Supposing you want only ID 1 because for ID 2 there is a value of A which is IN (9,-1,20) this is what you want:
or