Home

SQL Keywords: BETWEEN

 

Description

The BETWEEN keyword is used to create a type of conjunction based on two fields. The BETWEEN keyword is combined with the AND keyword. The formula to follow is:

Expression BETWEEN Start AND End

Expression is the name of the column whose values you want to examine.

Start is the starting value of the range to consider

End is the highest value to consider in the range.

After this condition is executed, it produces the list of values between Start and End. Here is an example:

SELECT Videos.Title, Videos.Director, Videos.CopyrightYear, Videos.Rating
FROM Videos
WHERE (Videos.CopyrightYear) Between 1994 And 2004;

A Parameterized Query

You can use the BETWEEN...AND... expression to create a parameterized query. Here is an example:

BETWEEN [Enter a starting year] AND [Enter an ending year]
 
 

 

   
    

Home Copyright © 2009-2016, FunctionX, Inc.