Click to See Complete Forum and Search --> : Anti-Unions


abudabit
01-01-2007, 09:35 PM
Is there a way in MySQL to do anti-UNION's? Unions are a cool improvement on or's, but what if you need to use two indexes with an 'and' functionality?

Basically I'm looking for a way in which a result needs to be in both of two SELECT statements to be returned. Is it possible?

chazzy
01-01-2007, 09:59 PM
typically an intersect is done via a where clause using an in.

russell
01-01-2007, 10:06 PM
sounds like an inner join to me

abudabit
01-01-2007, 10:14 PM
Awesome, thank you. I think that might be just what I need.