大家都知道between...and...是包含边界值的,但是我做了一实验,
- SQL code
select * from empwhere ename between 'A' and 'J';
在结果中有首字母为A的ename,但没有J的。这是为什么?
------解决方案--------------------
因为
- Java code
idle> select 1 from dual where 'Ja' <= 'J' ;no rows selected
select * from empwhere ename between 'A' and 'J';
idle> select 1 from dual where 'Ja' <= 'J' ;no rows selected