PL/SQL (MOSC)

MOSC Banner

SQL statement suggestion

edited Sep 13, 2010 5:30AM in PL/SQL (MOSC) 6 commentsAnswered ✓
Hi All,

We are firing the below SQL statements on daily basis. We have to keep last 5 days customers records only in our database. Is there any other way the query can be rewritten, so that it will execute faster.

delete from  ivr_unbilled_details_kl where (trunc(sysdate)-trunc(last_updated_date)) >=5 

delete from  ivr_unbilled_details_mh where (trunc(sysdate)-trunc(last_updated_date)) >=5 

delete from  ivr_unbilled_details_mp where (trunc(sysdate)-trunc(last_updated_date)) >=5 

delete from  ivr_unbilled_details_mu where (trunc(sysdate)-trunc(last_updated_date)) >=5 
.

.

.

like 24 delete statements are in the SQL file.

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center