> Hi MySQL-ers!
> Suppose you have a database of antique owners (we all know that one, I
> believe) where there's a table of sellable items:
> OwnerID | ObjectTypeID
> 1 | 1
> 1 | 2
> 2 | 2
> 3 | 1
> Now what kind of select statement would I use to get a list of OwnerID's
> that are willing to sell objects with ObjectTypeID 1 AND 2 (as is the
> case with ownerID 1 in the example table above?
> Greetings, Pieter van Beek
This is a often asked question on this list.
Perhaps next time you should search in one of the mail archives before.
Or get a good SQL book :)
Here we go:
sellableItems AS a
, sellableItems AS b