Home > php教程 > php手册 > 在SQL语句中使用正则表达式

在SQL语句中使用正则表达式

WBOY
Release: 2016-06-13 09:54:21
Original
1198 people have browsed it

能,可以用 regexp 关键字来实现。
比如:我想搜索 admin 表中 username 字段为数字的记录。则可以使用下面的 SQL 语句:
select * from articles where title regexp '[0-9].+';

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template