Hi there. I want to do the following:
SELECT count(id) FROM table WHERE value BETWEEN 3 AND 40;
But it should do the following:
SELECT count(id) FROM table WHERE value IN(3, 4, 5, 6, 7, 8, 9, 10, 11, ..., 40);
It should even print out zero count(id) for value between 3 and 40, but not value = x. I want to check if a value is in a sequence (1, 2, 3, 4, ..., 50).
Does anyone know how to achieve this with mysql?
Thanks.