You are on page 1of 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