I have to get all the records that have the time filed in next 5 minutes. I have written query -- but it does not get any records even if present.
WHERE time <= UTC_TIME() + INTERVAL 5
MINUTE AND time >= UTC_TIME()
Using only time you can have the following
select * from `table` where timediff (utc_time, time) < '00:05:00';
Without a date you will have 23:55:00 to 23:59:59 overflow problems. I'd consider using a datetime or unixtime instead if you have any control over the database.