Search the Whole World Here.,.,

SQL - BETWEEN Operator with IN Example





The following SQL statement selects all products with a price BETWEEN 10 and 20, but products with a CategoryID of 1,2, or 3 should not be displayed:

Example

SELECT * FROM Products
WHERE (Price BETWEEN 10 AND 20)
AND NOT CategoryID IN (1,2,3);

Try it Yourself »


EmoticonEmoticon