Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Query for older than one month data

SmileJun 6 2013 — edited Jun 6 2013
Hi Team,
I need the query that must return the data of older than one month .
Means whenever i execute the query (today , tomorrow, yesterday ... ) , the query should give me result of older than one month .

Is the following query is correct !!
CREATE TABLE DATE_CHECK
(
  VAL  NUMBER,
  DT   DATE
)

SELECT * FROM 
 DATE_CHECK
         WHERE  TRUNC(dt)  < TRUNC(SYSDATE-30)
Please suggest is this correct , I tried with Sample data , It is coming as expected . I just wanted your suggestions
This post has been answered by Frank Kulash on Jun 6 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 4 2013
Added on Jun 6 2013
4 comments
5,588 views