How to find the nearest integer to a specified integer from a table of integers?
- by corrilaz
How to find the nearest integer upon the provided one?
Say, I have the following integers in the mysql database: 405, 600, 304. The question is how to I select 600 upon providing 550 or select 304 upon providing 300 (ie, so as to find the nearest integer)?
i am talking about INTEGERS, not floats.