for alexp -
09-26-2006
, 07:33 AM
SELECT name
FROM `table`
ORDER BY ABS( `age` -43 ) ASC
LIMIT 1
Of course, this doesn't account for ties. To do that I guess you could
have this query as a subquery and then LEFT JOIN where age = 43 +/-
difference, but I'll leave that as an exercise for the reader. |