How to write a SQL query to find the range from column values? I have some fields in my database which contain values like 2483-5802 and 1245-3325.

Now I have a user input and I have to find it from this column.
Example if I have to search 2000 which will come in range 1245-3325.

So how I can write a query to find that 2000 belongs to 1245-3325 this range?
As follows (replace yourtable and each of the two instances of rangefield):

SELECT *
FROM `yourtable`
WHERE ? BETWEEN CAST(`rangefield` AS int) AND CAST(MID(`rangefield`, LOCATE('-', `rangefield`)+1) AS int);