Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project










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 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information