String comparison is based on alphabetical order. The string M9W
is not alphabetically between M9W0A0
and M9W9Z9
. Alphabetically, it comes before both. Alphabetically, it comes before any string M9W<<any character(s) here>>
.
using between function in oracle
-
11-07-2023 - |
Question
I have already searched the internet what is the logic in oracle when using a between function in string but couldn't seem to find or understand it.
For example.
select 1 from dual
where 'M9W' between 'M9W0A0' and 'M9W9Z9'
Why would the above query would not return a row?
Can someone please explain?
Thank you very much.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow