SQL Between clause with strings columns

后端 未结 6 2085
暖寄归人
暖寄归人 2020-11-27 19:24

I want to make a search using \"between\" clause over a string column. Doing some test I got this:

Let\'s assume that there is a country table with a \"name\" column

6条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-27 20:04

    i think i know how to solve your problem. u can try adding extra character in the back like this

    select * from tablea where column1 between 'ABC' and 'ACD'+'Z'
    

    this will return a result from ABC% to ACE

提交回复
热议问题