ID VALUES
1 A
1 B
2 B
i am trying to find all ID that have value A & B. I am using mysql and when i tried
Code: Select all
SELECT id FROM relation_table WHERE values = 'A' AND values ='B'when i do OR instead of AND then ofcourse 2 will come out since 2 has B.
How do i write the Select statement so that when i was the id that contains both A and B?
Thank you in advance.
Regards
Mian