Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Is Primary Key always the index of the table in Oracle?
On 06.03.2007 08:49, Arto Viitanen wrote:
> Kaka wrote:
>> Can someone explain to me if the Primary Key always the same as Index >> of the table in Oracle? If not, how are they related? Thank you in >> advance!
Actually with index organized tables the index *is* the table. The OP probably comes from an MS SQL Server background where the clustered index *is* the table. An IOT in Oracle resembles a SQL Server table with CI.
> Since primary key is a constraint that an attribute or attributes of
> the table can have only one row per one value of the attribute
> (or set of attributes if there are more than one), almost all RDBMSs
> make an index for the primary key. But, you can add more indexes to
> the table, and remove them if you like.
IIRC you can make Oracle create a constraint without an index. Not very useful most of the time but I think you can do that.
Kind regards
robert Received on Tue Mar 06 2007 - 05:07:01 CST