Skip to Main Content

Oracle Database Discussions

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!

About range partition

shipon_97May 17 2010 — edited May 17 2010
Dear Friends ,

I am using Oracle10g . I have to create a range partition like below :


CREATE TABLE EMP
(
EMPNO NUMBER(4),
ENAME VARCHAR2(10 BYTE),
JOB VARCHAR2(9 BYTE),
MGR NUMBER(4),
HIREDATE DATE,
SAL NUMBER(7,2),
COMM NUMBER(7,2),
DEPTNO NUMBER(2)
)

PARTITION BY RANGE(hiredate)
(
PARTITION emp_1980 VALUES LESS THAN(TO_DATE('31/12/1980','DD/MM/YYYY')) TABLESPACE USERS,
PARTITION emp_1981 VALUES LESS THAN(TO_DATE('31/12/1981','DD/MM/YYYY')) TABLESPACE USERS,
PARTITION emp_1982 VALUES LESS THAN(TO_DATE('31/12/1982','DD/MM/YYYY')) TABLESPACE USERS,
PARTITION emp_1987 VALUES LESS THAN(TO_DATE('31/12/1987','DD/MM/YYYY')) TABLESPACE USERS
);

But the problem is :

1) if any input data is not match with the above criteria then where it goes ? i mean , the data which dont follow the above rule which partition it goes ? is there any way to set DEFAULT partition option in the range partition ?
I only find the DEFAULT option in LIST partition

2) Barring this , when I add a new partition with the above then it shows the below error :

alter table emp add partition emp.emp_1988 VALUES LESS THAN(TO_DATE('31/12/1988','DD/MM/YYYY')) TABLESPACE USERS


Error :
"ORA-14020: this physical attribute may not be specified for a table partition" ,



Would anybody plz help me , How can I solve the above problems ?
This post has been answered by Hemant K Chitale on May 17 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2010
Added on May 17 2010
5 comments
1,210 views