我有一个项目列表,其值介于1A和100Z (1A,2A,3A,...,100A,1B,2B,3B,...,100Z)。< / p>
如何获取43A到64X之间的所有项目(f.i.)?
我尝试过这样的事情:
SELECT * FROM table_with_items WHERE column_with_value <= 43A AND column_with_value >= 64X
和此:
SELECT * FROM table_with_items WHERE column_with_value BETWEEN 43A AND 64X
但它不能那么简单:)
那么有没有办法比较字母数字字符串?
谢谢!
答案 0 :(得分:-2)
你是否尝试将你想要的字符串作为边界写成,字符串?
SELECT * FROM table_with_items WHERE column_with_value BETWEEN '43A' AND '64X';