I am trying to select all the rows in which COLUMN has a value between 1 and 9. The problem is the datatype for COLUMN is text and I have used the following code to get those rows:
SELECT * FROM TABLE WHERE COLUMN BETWEEN '1' AND '9';
Instead of getting rows with COLUMN value between 1 and 9, I also get rows with COLUMN values 10, 11 and so forth. How can I make it give me only rows with COLUMN values between 1 and 9?