I Have following table structure
Table 1:
| id | allowed_user_type |
| 1 | 8,9,10 |
Table 2:
| id | user_type |
| 1 | 9 |
so, wanted to check if user_type from Table 2 is exists in allowed_user_type in Table 1: then returns me true otherwise false.
I’ve used IN and FIND_IN_SET MySQL statement but no help.
Thanks!
FIND_IN_SETworks for me.SQLFIDDLE
But I agree with the other posters that this is poor design. If you have to do it for a large number of rows it will be very slow, because it can’t use indexes.