如何按一系列起始字符进行选择?

2022-01-24 00:00:00 database select range startswith mysql

这是我的 mySQL 查询:

Here is my mySQL query:

SELECT *
FROM `eodList` 
WHERE datechanged>='$curdate' 
GROUP BY symbolName 
ORDER BY dateChanged DESC

如何获取所有 symbolName 以字母 A-F 开头的行(例如)?

How do I get all rows (for example) where symbolName starts with letters A-F?

更新:

我需要无需大量代码更改即可轻松更改为另一个范围的东西.

I need something that can be easily changed to another range without alot of code changes.

推荐答案

试试 正则表达式

WHERE symbolName REGEXP '^[A-F]'

相关文章