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!

creating index associated with unique constraints

789765Mar 10 2011 — edited Mar 10 2011
I have 10gR2 on AIX . I imported the table witouth any indexes and constraints. To set the storage options for the indexes associated with UNIQUE and PRIMARY KEYI i first created the unique index and try to associate with the primary key. I am getting error.

sqlplus>create unique index cpp.jpt on cpp.bal(apt_id) PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 8388608 NEXT 8388608 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE jpt
PARALLEL 4
NOLOGGING
sqlplus>index created

when i tried to associate this index with the primary key
sqlplus>ALTER TABLE Cpp.bal ADD CONSTRAINT cpp.jpt PRIMARY KEY(apt_id) USING INDEX cpp.jpt;

I am getting
ERROR at line 1:
ORA-01735: invalid ALTER TABLE option

Please any help will be appreciated

Edited by: user9074365 on Mar 10, 2011 1:17 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 7 2011
Added on Mar 10 2011
2 comments
173 views