Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
The BETWEEN keyword specifies an inclusive range, in which the lower value and the upper value are searched for as well as the values they bracket.
To list all the products with prices between $10 and $15, inclusive
Enter the following query:
SELECT Name, UnitPrice FROM Products WHERE UnitPrice BETWEEN 10 AND 15;
You can use NOT BETWEEN to find all the rows that are not inside the range.
To list all the products cheaper than $10 or more expensive than $15
Execute the following query:
SELECT Name, UnitPrice FROM Products WHERE UnitPrice NOT BETWEEN 10 AND 15;
|Send feedback about this page via email or DocCommentXchange||Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0|