Mysql判断字符串存在性find_in_set
生活随笔
收集整理的這篇文章主要介紹了
Mysql判断字符串存在性find_in_set
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
https://www.jianshu.com/p/b2c1ba0ba34f
FIND_IN_SET(str,strList) str 要查詢的字符串 strList 字段名,參數以“,”分隔,如(1,2,6,8) 查詢字段(strList)中包含的結果,返回結果null或記錄。 find_in_set()和in的區別:in針對所有的的列的 find_in_set()和like的區別:like是看做一個整的字符串了select find_in_set('1','1,2,3,4,5,6'); 1 select find_in_set('2','1,2,3,4,5,6'); 2 select find_in_set('7','1,2,3,4,5,6'); 0 select find_in_set('2','1,21,3,4,5,6'); 0 select find_in_set('1',''); 0 select find_in_set(null,'1,2,3,4,5,6'); null select find_in_set('1',null); null?
總結
以上是生活随笔為你收集整理的Mysql判断字符串存在性find_in_set的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 上甘岭敌人为什么攻不进坑道?
- 下一篇: 香港新界元朗公庵路山下建材城路口坐地铁是