sql - How to search between columns in mysql -


i have 2 columns store values(numbers), how select given number between values in 2 columns?

example

   `id | col1 | col2`       `1 | 20  | 50`       `2 | 200 | 400`       `3 | 500 | 650` 

if have value of 25, how can select records value of 25 between them in case row 1

select * mytable 25 between col1 , col2; 

Comments

Popular posts from this blog

List<T>().Add problem C# -

Javascript natural sort array/object and maintain index association -