unable to make out use of BETWEEN in oracle

Posted by Ankit Sachan on Stack Overflow See other posts from Stack Overflow or by Ankit Sachan
Published on 2010-03-07T20:56:15Z Indexed on 2010/03/08 3:51 UTC
Read the original article Hit count: 465

Filed under:
|

I am not able to make this out: Between eliminates use of >= and <=

...but when i tried this query:

SELECT *  
  FROM names 
 WHERE name >= 'Ankit' 
   AND name <= 'P'

...it gives output:

name
------
Ankit
Mac
Bob

When I tried:

SELECT *  
  FROM names  
 WHERE name BETWEEN 'Ankit' AND 'P'

...it gives output:

name
------
Ankit

Can you explain this why?

© Stack Overflow or respective owner

Related posts about sql

Related posts about Oracle