Reputation: 5757
I want to find integers any integers between 6 and 10. I've tried:
[6-10]{1,2}
but this throws a mysql error (this is for a mysql query). How do you match numbers between 6 and 10?
Upvotes: 9
Views: 615
Reputation: 263703
why complicate your syntax? couldn't it be as simple as this? Using BETWEEN
,
SELECT...
FROM..
WHERE columnName BETWEEN 6 AND 10
but anyway if you have other use, you can use REGEXP
in MySQL
where columName REGEXP '10|[6-9]'
Upvotes: 26