0% found this document useful (0 votes)
41 views1 page

Between

The document provides an example of using the BETWEEN operator in SQL to select records where a value falls within a specified range of two values, and gives an example query to select employees hired between 1992 and 1994.

Uploaded by

venkatbj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views1 page

Between

The document provides an example of using the BETWEEN operator in SQL to select records where a value falls within a specified range of two values, and gives an example query to select employees hired between 1992 and 1994.

Uploaded by

venkatbj
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

syn:

<exp> BETWEEN <val1> AND <val2>

ex: get the employees who joined b/w 1992 and 1994

select * from emp


where hiredate between '1/1/1992' and '12/31/1994'

(or)

select * from emp


where datepart(yy,hiredate) between 1992 and 1994

You might also like