OPERATION: BETWEEN
... AND
SELECT * | list FROM table
WHERE
expression [NOT] BETWEEN value1 AND value2
The BETWEEN ...
AND operator is used to specify a selection criteria by
requiring an expression to be equal to one of, or fall between the
range defined by, two values. These values can be numbers,
characters, strings, or dates, but you cannot use any wildcard
characters. The characters, strings, and dates must be enclosed by a
pair of single quotes.
In this query, we search for song titles
released during the 1980s:
SELECT
* FROM SongTitles
WHERE ReleaseDate BETWEEN
'1/1/80' AND '12/31/89'
By using the NOT operator, you can search for values that lie outside
the range:
SELECT
* FROM Instruments
WHERE CatNum NOT BETWEEN
1097 AND 2355
Copyright 2000 by Infinite Software Solutions, Inc.
Trademark Information
|