Is it possible to define a range for the IN part of the query, something like this
SELECT job FROM mytable WHERE id IN (10..15);
Instead of
SELECT job FROM mytable WHERE id IN (10,11,12,13,14,15);
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can’t, but you can use
BETWEENNote that
BETWEENis inclusive, and will include items with both id 10 and 15.If you do not want inclusion, you’ll have to fall back to using the
>and<operators.