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!

Does adding a PK constraint wo a "using index" automatically create an index

rjsosiSep 28 2021

Hi ,
We're using Oracle 12c.
We dropped and recreated a Primary Key (PK) Constraint. using the following:

alter table table_name add constraint constraint_name primary key (col1, col2, col3)
enable novalidate;

There was already a PK Index there from the previous PK constraint. It looks like it created an additional PK index.
Was that because we didn't specify "USING INDEX" in the ALTER statement?
So in other words does creating a PK Constraint automatically create a PK Index, even if a PK Index already exists, if you don't specify "USING INDEX" in the ALTER statement?

This post has been answered by mathguy on Sep 28 2021
Jump to Answer

Comments

Post Details

Added on Sep 28 2021
10 comments
8,615 views