标签:
SELECT `column` from `table` where locate(‘keyword‘, `condition`)>0; // LOCATE(substr,str,pos);locate 多一个起始位置的参数 SELECT `column` from `table` where position(‘keyword‘ IN `condition`); SELECT `column` from `table` where instr(`condition`, ‘keyword‘)>0; SELECT `column` from `table` where find_in_set(‘keyword‘, `condition`); SELECT * FROM test WHERE pnum REGEXP ‘(3|9)‘;// 正则查找 或
MySQL比like语句更高效的写法locate position instr find_in_se
标签:
原文地址:http://my.oschina.net/liufeng815/blog/522272