I have table with 2 columns ….
id id2
1 1
1 2
1 3
2 1
2 2
2 4
3 2
3 3
3 4
I want to return the ids which have for example id2 in (1, 2, 4) but that has all of the values in the list.
In this above case it would return id = 2. Is this possible?
Update:
If the list of IDs is variable, then you should create an additional table that contains the varying sets of IDs, which you can then
JOINagainst to do your filtering.