I have a table with those fields:
phID, ProductID
The phID is the pharmacy id and the ProductID is the product id.
- One pharmacy has multiple products
- 1 product is to multiple pharmacies
Example:
phID ProductID
-----------------
1001 9
1001 10
1001 11
1004 9
1004 12
1004 14
1004 11
The query that I want is so I can get all the phID that has the same product.
I have this query:
SELECT phID, ProductID
FROM ph_pd
WHERE ProductID IN (9,10,11)
I want the results to be
1001 9
1004 9
1001 11
1004 11
or just
1001
1004