MySQL query finding values in a comma separated string

后端 未结 11 1389
孤独总比滥情好
孤独总比滥情好 2020-11-21 23:40

I have a field COLORS (varchar(50)) in a my table SHIRTS that contains a comma delimited string such as 1,2,5,12,15,. Each number repr

11条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-21 23:55

    All the answers are not really correct, try this:

    select * from shirts where 1 IN (colors);
    

提交回复
热议问题