【发布时间】:2020-08-03 20:25:30
【问题描述】:
我有一张桌子(书)
id, title
我使用 REGEXP 匹配进行了选择
select title
from books
where title REGEXP "word1|word2|...|wordn"
我怎样才能在标题中找到多少个单词才能获得这样的查询?
select title, numberofwordsfound
from books
where title REGEXP "word1|word2|...|wordn"
提前感谢大家:)
【问题讨论】:
标签: mysql sql string sql-like regexp-like