I have a table in my database which has the following structure:
ID | Date | Ball1 | Ball2 | Ball3 | Ball4 | Ball5 | Ball6 | Ball7 | BonusBall
All the Ball rows are just integers.
What I want to do now is to write a select query that selects all the rows that have multiple of the same values in it.
For instance all the rows that contain 1 and 12.
I tried the following query, but that doesn't quite give my what I want:
SELECT * FROM number
WHERE ball1 OR ball2 OR ball3 OR ball4 OR ball5 OR ball6 OR bonusball IN (1,12);
Am I on the right track? Any suggestions?