Suppose I have a \"tags\" table with two columns: tagid and contentid. Each row represents a tag assigned to a piece of content. I want a
The only alternative way i can think of is:
select a.contentid from tags a inner join tags b on a.contentid = b.contentid and b.tagid=334 inner join tags c on a.contentid = c.contentid and c.tagid=342 where a.tagid=338