I need to select rows where timestamp is between now and 5 minutes in the past. How do I do it? Something like that:
select * from tableName where timestamp between sysdate and up to -5 min
The simpler - the better.
select *
from tableName
where timestamp between sysdate and sysdate - interval '5' minute
or old style:
select *
from tableName
where timestamp between sysdate and sysdate - 5 * 60 / 86400
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With