Database Administration (MOSC)

MOSC Banner

Deleting data from a partioned table

edited Dec 6, 2011 3:54AM in Database Administration (MOSC) 4 commentsAnswered
I have a table that is partitoned by range using date. The table also has a foreign key with referential integrity and the child table does have data in it. The cascade on delete is set to no. The sql script that was given to me simply runs a delete * from table where timestamp < (SYSDATE-30);

The second sql statement in the script is basically trying to delete the data from the child table older than 30 days.

delete * from child_table where timestamp < (SYSDATE-30)

First, I am trying to get a better understanding of tables with partitions but I think should I have statements in the script that alters table drop partition after the deletes to effectively remove the data

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