Home  >  Article  >  Backend Development  >  Using regular expressions in SQL statements_PHP tutorial

Using regular expressions in SQL statements_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:53:32834browse

Yes, this can be achieved using the regexp keyword.
For example: I want to search for records in the admin table where the username field is a number. You can use the following SQL statement:
select * from articles where title regexp '[0-9].+';

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632398.htmlTechArticleYes, it can be achieved using the regexp keyword. For example: I want to search for records in the admin table where the username field is a number. You can use the following SQL statement: select * from articles whe...
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