Oracle Between

The Oracle Between determines whether the value of one expression is in an interval defined by two other expressions.

Oracle Between example

Select *
From users_log u 
Where u.log_date 
Between '01-OCT-2011' And '31-OCT-2011';


Select *
From books b 
Where b.book_id 
Not Between 100 and 300;


Declare
v_id number := 5;
Begin
If v_id Between 5 And  10 Then
dbms_output.put_line('v_id is in the range');
End If;
End;