I have a problem building a query in oracle. I have table with column "DATE_CREATE", which has a type of "TIMESTAMP". Example of one value is:
2012-10-20 05:43:47:001000
I would like to build a where clause for selecting rows with create column newer than 15 minutes ago. For now I have a query like this (which return no rows, but it should):
SELECT DATE_CREATE,ID
FROM TABLE
WHERE DATE_CREATE >= CURRENT_TIMESTAMP - interval '15' minute
Help please...
Try this:
SELECT DATE_CREATE,ID
FROM TABLE
WHERE DATE_CREATE >= CURRENT_TIMESTAMP - NUMTODSINTERVAL(15, 'MINUTE')
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