Get the App
SLTechnology News&Howtos  ›  Database  › 

Sort between strings

Shulou Source: shulou.com Published: 2022-06-01 05:31:24 10月03日 Update

When getting the results in the range of strings, I was a little confused about the results. I found an English document, which is explained here.

SELECT * FROM emp WHERE ename BETWEEN'A 'AND' C'

Because when you sort it alphabetically,

Constant Clark C Claude

You'll get.

C Clark Claude Constant

So

C < Clark < Claude < Constant

To determine string ordering, first compare the first character, if the first character is the same, compare the second, and so on.

Original text:

Http://stackoverflow.com/questions/15260869/oracle-use-of-between-with-letters-between-a-and-c

Tags: Characters strings sorting results same confused and so on original text letters documents ranges order English analogies interpretations etc. Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MariaDB Linux NVidia MySQL