mysql check if numbers are in a comma separated list

前端 未结 7 1990
萌比男神i
萌比男神i 2020-11-27 06:13

I have a table like this:

UID(int) NUMBERS(blob)
----------------------
1        1,13,15,20
2        3,10,15,20
3        3,15

And I would l

7条回答
  •  孤独总比滥情好
    2020-11-27 06:57

    Also check if this is helpful to anyone

    An Extended function to eliminate the limitation of native FIND_IN_SET() in MySQL, this new extended version FIND_IN_SET_X() provides feature to compare one list with another list.

    i.e.

    mysql> SELECT FIND_IN_SET_X('x,c','a,b,c,d'); -> 3 
    

    Checkout this link for more details.

提交回复
热议问题