Message-Id: <10737.126322@fatcity.com> From: Alex Hillman Date: Wed, 10 Jan 2001 14:55:37 -0500 Subject: RE: Primary Constraints and Indexes This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C07B3F.4DB5D870 Content-Type: text/plain; charset="windows-1252" And this index don't even need to bi unique (at least in 8i). Alex Hillman -----Original Message----- From: Regina Harter [mailto:rharter@EMC-INC.COM] Sent: Wednesday, January 10, 2001 1:00 PM To: Multiple recipients of list ORACLE-L Subject: Re: Primary Constraints and Indexes Wayne, Yes, you are correct, the second index is unnecessary. Creating the primary key is the same index with the addition of a unique constraint and a not null constraint. At 07:46 AM 1/10/01 -0800, you wrote: >As a part-time dba, I am confused about the differences between >Primary Keys and Indexes. > >For example if I create a table "EMPLOYEES" and in the table >creation statement I do something like: > create table ... > constraint XXX primary key (EMP_ID) using index ... >then later I create an index: > create index YYY on EMPLOYEE (EMP_ID) ... >I know I have created two indexes (the first one system-named >and implicitly created and the second name YYY and created >explicitly) but do I really need the second index YYY? >It seems to me the YYY index is not really needed? Can >someone shed some light on this for me. > >THANKS, Wayne >McGillWL@navair.navy.mil > >-- >Please see the official ORACLE-L FAQ: http://www.orafaq.com >-- >Author: Wayne McGill > INET: McGillWL@navair.navy.mil > >Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 >San Diego, California -- Public Internet access / Mailing Lists >-------------------------------------------------------------------- >To REMOVE yourself from this mailing list, send an E-Mail message >to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in >the message BODY, include a line containing: UNSUB ORACLE-L >(or the name of mailing list you want to be removed from). You may >also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Regina Harter INET: rharter@emc-inc.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). ------_=_NextPart_001_01C07B3F.4DB5D870 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: quoted-printable RE: Primary Constraints and Indexes

And this index don't even need to bi unique (at least = in 8i).

Alex Hillman

-----Original Message-----
From: Regina Harter [mailto:rharter@EMC-INC.COM]
Sent: Wednesday, January 10, 2001 1:00 PM
To: Multiple recipients of list ORACLE-L
Subject: Re: Primary Constraints and Indexes


Wayne,

Yes, you are correct, the second index is = unnecessary.   Creating the
primary key is the same index with the addition of a = unique constraint and
a not null constraint.

At 07:46 AM 1/10/01 -0800, you wrote:
>As a part-time dba, I am confused about the = differences between
>Primary Keys and Indexes.
>
>For example if I create a table = "EMPLOYEES" and in the table
>creation statement I do something like:
>      create table = ...
>         = constraint XXX primary key (EMP_ID) using index ...
>then later I create an index:
>    create index YYY on EMPLOYEE = (EMP_ID) ...
>I know I have created two indexes (the first one = system-named
>and implicitly created and the second name YYY = and created
>explicitly) but do I really need the second = index YYY?
>It seems to me the YYY index is not really = needed? Can
>someone shed some light on this for me.
>
>THANKS,  Wayne
>McGillWL@navair.navy.mil
>
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.com
>--
>Author: Wayne McGill
>   INET: = McGillWL@navair.navy.mil
>
>Fat City Network Services    -- = (858) 538-5051  FAX: (858) 538-5051
>San Diego, = California        -- Public Internet = access / Mailing Lists
>-----------------------------------------------------------= ---------
>To REMOVE yourself from this mailing list, send = an E-Mail message
>to: ListGuru@fatcity.com (note EXACT spelling of = 'ListGuru') and in
>the message BODY, include a line containing: = UNSUB ORACLE-L
>(or the name of mailing list you want to be = removed from).  You may
>also send the HELP command for other information = (like subscribing).

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Regina Harter
  INET: rharter@emc-inc.com

Fat City Network Services    -- (858) = 538-5051  FAX: (858) 538-5051
San Diego, = California        -- Public Internet = access / Mailing Lists
---------------------------------------------------------------= -----
To REMOVE yourself from this mailing list, send an = E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of = 'ListGuru') and in
the message BODY, include a line containing: UNSUB = ORACLE-L
(or the name of mailing list you want to be removed =