select id from table where content like '%aa%'content是保存编辑器里的内容如何在搜索的时候排除标签的里关键字如 <img src="/static/imghwm/default1.png" data-src=" aa.png" class="lazy" alt="SQL语句问题" > 在搜aa的时候不被搜出
SQL 不具备这个能力
//不知道是否符合你要求,试下select id from table where content like '%aa%' and content not regexp '.*aa.*\\.[jpg|png|jpeg]';