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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Newbie: table indexes

Re: Newbie: table indexes

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Tue, 06 Jul 1999 21:44:10 +0800
Message-ID: <3782082A.12FB@yahoo.com>


Noah Arliss wrote:
>
> Thank you,
> we are trying to create a naming convention for the indexes within our
> database, when you create a primary key it automatically creates an index on
> the system.. is it possible to specify the index name when creating a
> primary key?
>
> Marc Mazerolle wrote in message <378257DE.A5E9E878_at_sympatico.ca>...
> >Try the all_ind_columns for columns of the indexes and all_tab_columns for
> >columns of the tables.
> >
> >Noah Arliss wrote:
> >
> >> Is there anyway to get the complete index information, including the keys
> >> that the index was created on out of the oracle database?
> >>
> >> the all_indexes table for gives me table name, owner, and index info, but
> >> not the keys the index exists on.. I need that info..
> >>
> >> Noah
> >

No - but if you name the primary key, then the index name will follow suit...

alter table xyz add constraint XYZ_PK
primary key ( col1, col2 ) using index tablespace ??? pctfree 0 storage ( initial ?? next ?? pctincrease 0);

will add a primary key called XYZ_PK (and an index of the same name)...

(PS - Use pctfree 0 for indexes)

HTH
--



Connor McDonald
"These views mine, no-one elses etc etc" connor_mcdonald_at_yahoo.com

"Some days you're the pigeon, and some days you're the statue." Received on Tue Jul 06 1999 - 08:44:10 CDT

Original text of this message

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