TheBigK
Well-known member
I'm building this query that requires me to check if a specific values exist inside 'secondary_group_id'. For example, say my secondary_group_id contains values like -
Row# => secondary_group_id
1 => 5,6,9
2 => 4,5,6
3 => 2,4,7
4 => 2,4,6
5 => 7,8,9
6 =>2,7,9
and I want to select only the rows that have ids: 2 or 7. That is ros #3, 4, 5 and 6. How do I go about it?
FIND_IN_SET -> won't allow me to enter two values to search
LIKE?
OR LOCATE?
Row# => secondary_group_id
1 => 5,6,9
2 => 4,5,6
3 => 2,4,7
4 => 2,4,6
5 => 7,8,9
6 =>2,7,9
and I want to select only the rows that have ids: 2 or 7. That is ros #3, 4, 5 and 6. How do I go about it?
FIND_IN_SET -> won't allow me to enter two values to search
LIKE?
OR LOCATE?