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 -> Re: Where is implicit pk index?

Re: Where is implicit pk index?

From: Andy Hardy <aph_at_ahardy.demon.co.uk>
Date: Tue, 29 Jun 1999 08:11:30 +0100
Message-ID: <B24yPBAiGHe3Ewm8@ahardy.demon.co.uk>


In article <37781B9F.40322647_at_bigfoot.com>, Doug Cowles <dcowles_at_bigfoot.com> writes
>Ok..next question...how do I know which SYS_C230909 it is? There are many...

Look at user_indexes.

Andy
>
>- Dc.
>
>holmesb_at_my-deja.com wrote:
>
>> In article <3776A263.4345C932_at_bigfoot.com>,
>> Doug Cowles <dcowles_at_bigfoot.com> wrote:
>> > 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....
>> If you do not supply a name for the primary key, Oracle supplies one.
>> Look in the same tablespace where the data segment is for an object with
>> a name like sys_c followed by several digits. Your first try did not
>> supply a name for the primary key. Your second try did.
>>
>> HTH
>> > 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...
>> >
>> > - Dc.
>> >
>> >
>>
>> Sent via Deja.com http://www.deja.com/
>> Share what you know. Learn what you don't.
>
>
>

--
Andy Hardy. PGP key available on request


Received on Tue Jun 29 1999 - 02:11:30 CDT

Original text of this message

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