I need to obtain from the following example table all the rows that match the exactly 5 minutes ago since the query is run.
The query will be scheduled to run every 5 minutes to get all the rows that were created in that range of time.
CREATE TABLE mytable ( date timestamp without time zone NOT NULL, id numeric(8) )
I've tried with the interval option but because my table has the column defined as timestamp without time zone
I'm not getting the proper info that I need.
Not sure why INTERVAL
is not working:
SELECT * FROM mytable WHERE "date" >= NOW() - INTERVAL '5 minutes';
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