Mysql find_in_set slash (/) delimiter

I have a value:
 1/2
 3/4/5
 2/3/6

I want to find the value 2, so the result should be
1/2
2/3/6

I do not want to use the LIKE operator. Is there a way to set the delimiter in the FIND_IN_SET function?

+4
source share
1 answer

You can use likeor find_in_set(). Here is one way:

where find_in_set(2, replace(col, '/', ',')) > 0
+5
source

All Articles