I have the following table
drink_name........cost........calories Black.............1...........30 Clue..............2...........40 Elephant----------3...........50 When I use the between command for characters (it excludes ending positions)
select drink_name from drink_info where drink_name between 'B' and 'C'; output: Black Note that Clue is omitted.
Now when using between for number comparison (it includes the ending position)
select drink_name from drink_info where cost between 1 and 3 Output: 1 2 3 Note that 3 is included.
Why is there a behaviour difference of the between keyword between integer and characters, because it includes the last number (3) whereas last character (Clue) is excluded