Home  >  Article  >  Backend Development  >  SQL语句问题

SQL语句问题

WBOY
WBOYOriginal
2016-06-20 12:27:26777browse

select id from table where content like '%aa%'content是保存编辑器里的内容如何在搜索的时候排除标签的里关键字如 <img  src=" aa.png" alt="SQL语句问题" >  在搜aa的时候不被搜出


回复讨论(解决方案)

SQL 不具备这个能力

//不知道是否符合你要求,试下select id from table where content like '%aa%'  and content not regexp '.*aa.*\\.[jpg|png|jpeg]';

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn