Friday, 15 March 2013

sql - how to drop manually a partition identified by its boundary? -



sql - how to drop manually a partition identified by its boundary? -

i've table partion month need drop partition older 2 months using plsql procedure under oracle 11g.i have tried alter table <table_name> drop partition <partition name>this 'll drop name of partition.but instead need drop month.my actual table is.

create table invoices_1 (in_no number not null, voice_date date not null, feed_back varchar2(500)) partition range (voice_date) (partition jan values less (to_date('01/12/2012', 'dd/mm/yyyy')) , partition feb values less (to_date('01/01/2013', 'dd/mm/yyyy')) , partition decs values less (to_date('01/02/2013', 'dd/mm/yyyy')) );

you can drop partition identifying boundary keyword for:

sql> alter table invoices_1 drop partition 2 (to_date('2012-12-01', 'yyyy-mm-dd')); table altered

sql plsql oracle11g

No comments:

Post a Comment