SQL LIKE condition to check for integer?

后端 未结 8 780
温柔的废话
温柔的废话 2020-12-01 01:11

I am using a set of SQL LIKE conditions to go through the alphabet and list all items beginning with the appropriate letter, e.g. to get all books where the title starts wit

8条回答
  •  栀梦
    栀梦 (楼主)
    2020-12-01 01:42

    I'm late to the party here, but if you're dealing with integers of a fixed length you can just do integer comparison:

    SELECT * FROM books WHERE price > 89999 AND price < 90100;
    

提交回复
热议问题