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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Delete on the basis of date

742528Jul 30 2010 — edited Jul 30 2010
Hi All,

I need to delete data from a table based on a date column. If the date in DATE column is 180 days old than current sysdate then it should delete otherwise not.

So i found out below two ways

1. Use sysdate-tab_date >180 in where clause

2. Use MONTHS_BETWEEN(sysdate,tab_date)*30 > 180


Please let me know what way would be performance efficient & faster. If you have any other way then please share that too.


Also Is there any way we can disable the writing into UNDO tablespace before deleting bulk data from database.


Thanks In anticipation.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2010
Added on Jul 30 2010
9 comments
2,286 views