truncate partition [message #598110] |
Thu, 10 October 2013 09:10 |
|
guddu_12
Messages: 227 Registered: April 2012 Location: UK
|
Senior Member |
|
|
Dear all,
I am trying to truncate a partition using syntax .
ALTER TABLE SALES6 TRUNCATE PARTITION FOR(DATE '02-03-07')
but when i query back to table i can still see the data it is not truncating.
create table sales6
(
sales_id number,
sales_dt date
)
partition by range (sales_dt)
(
partition p0701 values less than (to_date('2007-02-01','yyyy-mm-dd')),
partition p0702 values less than (to_date('2007-03-01','yyyy-mm-dd')),
partition p0703 values less than (to_date('2007-04-01','yyyy-mm-dd')),
partition p0704 values less than (to_date('2007-05-01','yyyy-mm-dd')),
partition p0705 values less than (to_date('2007-07-01','yyyy-mm-dd'))
);
INSERT INTO sales6 VALUES( 1, TO_DATE('02-06-2007','DD-MM-YYYY'));
INSERT INTO sales6 VALUES( 1, TO_DATE('12-02-2007','DD-MM-YYYY'))
INSERT INTO sales6 VALUES( 1, TO_DATE('11-01-2007','DD-MM-YYYY'))
INSERT INTO sales6 VALUES( 1, TO_DATE('15-05-2007','DD-MM-YYYY'))
INSERT INTO sales6 VALUES( 1, TO_DATE('27-04-2007','DD-MM-YYYY'))
ALTER TABLE SALES6 TRUNCATE PARTITION FOR(DATE '02-03-07')
what's wrong here
|
|
|
|
|
|
|
|
|
|
|
Re: truncate partition [message #598121 is a reply to message #598118] |
Thu, 10 October 2013 09:38 |
cookiemonster
Messages: 13920 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
guddu_12 wrote on Thu, 10 October 2013 15:30If it is problem with literal then in what format it will accept the value in current sceniro.
Do you really think the answer to that question isn't in the documentation page flyboy linked to?
read it.
|
|
|
|
|
|