I have a mysql database table with rows like this
id | values
1 | 5,6,8,1,9
2 | 12,22,5,20
3 | 18,55,3,2
I want a help in SELECT statement
To select rows that contain Numbers 1 OR 2
Without selecting rows that contain numbers like 12 or 22
SELECT * FROM test WHERE values REGEXP '/(^[,])?(1)(^[,])?/';