我只需要从MySQL数据库中检索8个字符或更少字符并以"ing"结尾的单词。
我正在使用 php,感谢您的帮助!
谢谢
喜欢
很容易
SELECT * FROM table WHERE field LIKE '%ing' AND LENGTH(field) <= 8
SELECT * FROM table WHERE field RLIKE '^.{0,5}[iI][nN][gG]$';
Select column from
Table
Where column like '%ing' and Length( column ) <=8
使用正则表达式
Select column
From table
Where column REGEXP '^.{0,5}ing$'
REGEXP 不区分大小写,将处理大写和小写字符