IN vs FIND IN SET

I have a row which holds some values in a comma-separated form
For example 2,3,6,8
Each one of the values represents a foreign key from some other tables.
I am trying to filter these values using an array. There are two ways of doing this
One is the way @Teodor is presenting with filtering using an array and the IN clause

the issue with this approach is that it does not bring results for values that are not at the start. I mean that if the row has 2,3,6,10 and the array contains only the 10 it won’t return anything

The other is @mebeingken using FIND IN SET

In both cases, although the FIND IN SET should work I am not getting the results I should. Does anyone of you have worked with any of the above to filter results using an array from a row that contains comma separated values?

Thank you!

Community Page
Last updated: