superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm writing a SQL query for an Oracle database. I want to select only the rows from a table that were created today.
The field name is CREATION_DATE. Running a DESCRIBE for the table, it tells me that the field is NOT NULL TIMESTAMP(6).
The data in that field is in the format DD-MON-YY HH.MM.SS.NNNNNN AM/PM.
So, how do I code the SELECT statement to retrieve only the rows with the CREATION_DATE of today?
Update:Select rows older than the past 15 minutes
Code: |
SELECT ..... CREATION_DATE FROM TBL
WHERE SYSTIMESTAMP - CREATION_DATE > TO_DSINTERVAL ('-0 05:15:00');
|
|
|