Hello guies,
I have a simple table such as
id code
1 201
1 202
1 203
2 201
2 202

I want to write a query to get the IDs based on codes. For example, I want to get the IDs if they have code 201 and 202. I can do it with the UNION function and id 1 and 2 will be returned.
But how can I find the IDs who has only codes: 201 and 202? That is, I want to get id 2 not 1 and 2.

Please advise me. Thanks,

Jerry