Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Why I can't have primary key on field that has index?
Oracle uses a unique index to maintain the primary key integrity constraint. Therefore your create table statement also creates the index you desire. It's my understanding that Oracle8 maintains primary key constraints without an index. This may, however, be a misunderstanding on my part.
HTH
badstreetboy_at_my-dejanews.com wrote:
>
> I try to create a table by:
>
> CREATE TABLE t1(
> f1 INTEGER NOT NULL PRIMARY KEY,
> f2 INTEGER NOT NULL);
> CREATE INDEX f1_index ON t1(
> f1);
>
> Then it gives me an err:
>
> ERROR at line 2:
> ORA-01408: such column list already indexed
>
> Why this happen? I would appreciate if anyone can help me. Thanks!
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
-- Douglas Taube douglas.taube_at_citibank.com Senior Applications Development Analyst Citibank Mortgages The views in this message are my own and do not reflect the views of my employer.Received on Fri Sep 18 1998 - 00:00:00 CDT
![]() |
![]() |