1.使用like,但是like在前面加%会让索引失效
SELECT count(1) FROM t_project WHERE project_address LIKE('%烟台市%');
2.使用LOCATE(substr,str)函数/LOCATE(substr,str,pos)
SELECT count(1) FROM t_project WHERE LOCATE('烟台市',project_address);
1.使用like,但是like在前面加%会让索引失效
SELECT count(1) FROM t_project WHERE project_address LIKE('%烟台市%');
2.使用LOCATE(substr,str)函数/LOCATE(substr,str,pos)
SELECT count(1) FROM t_project WHERE LOCATE('烟台市',project_address);