How can I extract only the records of the last 30 days in a manner that it is automatically updated whenever I run the query?
I'm using Oracle
Thank you so much
How can I extract only the records of the last 30 days in a manner that it is automatically updated whenever I run the query?
I'm using Oracle
Thank you so much
You can try the following ---
SELECT *
FROM TABLENAME
WHERE DATECOLUMN >= SYSDATE - 30;
Try this:
SELECT *
FROM Table
WHERE Table.ColumnName >= DATEADD(DAY, -30, GETDATE())