(1).查询某个字段是否包含某个字符串,可以直接使用like
SELECT oid,oname from zhongxing_options where oname like '%4G%'
(2).判断包含还可以用函数locate(str,field),判断字段field是否包含str,大于0则包含,否则不包含
SELECT oid,oname from zhongxing_options where locate('+',oname)=0 //获取oname不包含+号的记录 SELECT oid,oname from zhongxing_options where locate('+',oname)>0 //获取oname包含+号的记录