Home » SQL & PL/SQL » SQL & PL/SQL » primary key then index necessary?
primary key then index necessary? [message #23523] Sun, 15 December 2002 03:58 Go to next message
Paloo
Messages: 2
Registered: December 2002
Junior Member
I have created a table with a primary key. Do I also need to create an index at the same colomn? Or will Oracle automatically creates an index for my primary key colomn?
Re: primary key then index necessary? [message #23524 is a reply to message #23523] Sun, 15 December 2002 04:20 Go to previous messageGo to next message
Mark
Messages: 284
Registered: July 1998
Senior Member
Indexes are created automatically by Oracle, when you create a primary key or a unique constraint.
Re: primary key then index necessary? [message #23529 is a reply to message #23523] Sun, 15 December 2002 14:08 Go to previous messageGo to next message
sai sreenivas jeedigunta
Messages: 370
Registered: November 2001
Senior Member
Oracle automatically creates a unique index , try to see the user_indexes table for clarification..

sai
Re: primary key then index necessary? [message #23532 is a reply to message #23529] Sun, 15 December 2002 16:13 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Clarification: Oracle will create an index if there is no existing index (even a non-unique index) that can be used to enforce the constraint.
Previous Topic: Basic Update question
Next Topic: primary key then index necessary???
Goto Forum:
  


Current Time: Thu May 16 07:02:11 CDT 2024