通过sql查询语句,查询某个字段中包含特定字符串:
例子:查询e_book表的types字段包含字符串"3",有下面4种方式
select * from e_book where types like "%3%"; select * from e_book where find_in_set('3', types); select * from e_book where locate('3', types); select * from e_book where INSTR(types,'3');
第2、3中方式相对速度较快
转载于:https://www.cnblogs.com/quan-coder/p/9669975.html
最后
以上就是可靠樱桃最近收集整理的关于mysql 字段包含某个字符的函数的全部内容,更多相关mysql内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复