I have the following data in a table named dtlstbl which has columns id and refid
100,1
100,2
101,1
102,2
103,1
103,2
I am fetching data from this table thus
select id from dtlstbl where refid in (1,2)
All the records are returned.
I want a SQL 2000 query that will return only the following result
100
103
ie. id's which have ref id both 1 and 2.