Skip to Main Content

SQL & PL/SQL

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!

Altering a table to add primary key.

SudhirJan 23 2009 — edited Jan 23 2009
Hi,

I am altering a table to add a primary key with using index option.

for ex: ALTER TABLE <table_name> ADD CONSTRAINT PRIMARY KEY (<column_name>)
USING INDEX <do we need to give table space name here or index_name>;

if index_name then firstly do we need to create a index on the column on which we need to create a primary key
and then give the index name in the alter table Script.

Please advice.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2009
Added on Jan 23 2009
5 comments
94,987 views