Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Where is implicit pk index?

Where is implicit pk index?

From: Doug Cowles <dcowles_at_bigfoot.com>
Date: Sun, 27 Jun 1999 18:14:59 -0400
Message-ID: <3776A263.4345C932@bigfoot.com>


I'm under the understanding that when you make a primary key, a unique index is created by Oracle. In one form of the syntax, I can't find it.

If I -
SQL> create table junk(a NUMBER primary key, b NUMBER);

Table created.

SQL> insert into junk values (1,2);

1 row created.
etc....
Commit complete.

SQL> select * from user_objects where object_name like '%JUNK%';

JUNK

                                     3649           3649 TABLE
27-JUN-99 27-JUN-99 1999-06-27:17:58:54 VALID N N But if I

SQL> create table junk (a NUMBER , b NUMBER);

Table created.

SQL> alter table junk
  2 add constraint junkpk primary key (a);

Table altered.

SQL> select * from user_objects where object_name like '%JUNK%';

JUNK

                                     3651           3651 TABLE
27-JUN-99 27-JUN-99 1999-06-27:18:03:57 VALID N N JUNKPK
                                     3652           3652 INDEX
27-JUN-99 27-JUN-99 1999-06-27:18:04:24 VALID N N So where is the index in the first form of the syntax? I also tried dba_segments, dba_objects, dba_indexes, only 1 entry... Received on Sun Jun 27 1999 - 17:14:59 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US