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

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -