How can one select only the items he want in the IN list? for example
select * from pagetags where TagID in (1,2,4)
Now I want all the page
The term for this type of problem is relational division. One way below.
SELECT PageID FROM pagetags WHERE TagID IN ( 1, 2, 4 ) GROUP BY PageID HAVING Count(DISTINCT TagID) = 3