开发者

MYSQL: condition _IN_ doesn't work correct

So I have column 'CLM' in the table where one record has follow value: '4,6,1'.

I do follow select: SELECT * FROM table WHERE 6 IN (CLM) got nothing then.

I do follow select: SELECT * FROM table WHERE 4 IN (CLM) got record described behind.

Cannot understand why first query works wro开发者_如何学运维ng?


You have to use find_in_set function even though it would be better you normalize your table as already suggested.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜