我有一個表「optionsproducts」具有下列結構和值檢查單個列的MySQL
ID OptionID ProductID
1 1 1
1 2 1
1 3 1
1 2 2
1 2 3
1 3 3
現在我想提取ProductIDs針對其中兩個OptionID 2和OptionID 3被分配。這意味着在這種情況下應返回ProductID 1和3。我不知道我錯過了什麼。任何幫助將不勝感激。使用上(列名),由列名的順序不同
ProductID
-----------
1
3
非常感謝 –