Is there a easy way to do an IN ALL command in SQL?
For example if I had:
SELECT * FROM [table] WHERE col IN (1,2)
this is really the same as:
SELECT * FROM [table] WHERE col = 1 OR col = 2
but what I really want is:
SELECT * FROM [table] WHERE col = 1 AND col = 2
SELECT id
FROM [table]
WHERE col IN (1,2)
group by id
having count(distinct col) = 2