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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Primary keys vs. unique indexes

RE: Primary keys vs. unique indexes

From: <Winnie_Liu_at_infonet.com>
Date: Thu, 30 Nov 2000 10:06:11 -0800
Message-Id: <10696.123338@fatcity.com>


Lisa,

James is correct. Foreign key cannot reference to just an unique index.=  The
referenced column had to have the unique constraint or the primary key constraint.

Remember, an unique constraint is different from the unique index. The constraint will automatically create an unique index for you. But the i= ndex
will NOT automatically create a constraint for you.

Winnie

"Koivu, Lisa" <lkoivu_at_qode.com>@fatcity.com on 11/30/2000 09:20:21 AM

Please respond to ORACLE-L_at_fatcity.com

Sent by: root_at_fatcity.com

To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> cc:

Subject: RE: Primary keys vs. unique indexes

What?=A0 Yes you can.=A0 I have anyway.

Can you give me an example of when that would not work?

Lisa Rutland Koivu
Oracle Database Administrator
Qode.com
4850 North State Road 7
Suite G104
Fort Lauderdale, FL=A0 33319

V: 954.484.3191, x174
F: 954.484.2933
C: 954.658.5849

http://www.qode.com

"The information contained herein does not express the opinion or posit= ion
of Qode.com and cannot be attributed to or made binding upon Qode.com."=

-----Original Message-----
From: james ellis [mailto:jellis24_gso_at_yahoo.com] Sent: Thursday, November 30, 2000 11:51 AM To: Multiple recipients of list ORACLE-L Subject: Re: Primary keys vs. unique indexes

The main difference is you can not reference an unique index with a foreign key.
--- cemail_at_sprintmail.com wrote:
>
> What is the difference between building a table and
> including
> the primary key versus building the table and then
> having creating
> a unique index on the same keys?=A0 When you create a
> table with
> a primary key, doesn't Oracle store it as an index
> anyway?
>
> -----
> Sent using MailStart.com (
> http://MailStart.Com/welcome.html )
> The FREE way to access your mailbox via any web
> browser, anywhere!
>
> --
> Please see the official ORACLE-L FAQ:
> http://www.orafaq.com
> --
> Author:
>=A0=A0 INET: cemail_at_sprintmail.com
>
> Fat City Network Services=A0=A0=A0 -- (858) 538-5051=A0 FAX:
> (858) 538-5051
> San Diego, California=A0=A0=A0=A0=A0=A0=A0 -- Public Internet
> access / Mailing Lists
>



> To REMOVE yourself from this mailing list, send an
> E-Mail message
> to: ListGuru_at_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).=A0 You may
> also send the HELP command for other information
> (like subscribing).


Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products. http://shopping.yahoo.com/
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: james ellis
=A0 INET: jellis24_gso_at_yahoo.com

Fat City Network Services=A0=A0=A0 -- (858) 538-5051=A0 FAX: (858) 538-=
5051
San Diego, California=A0=A0=A0=A0=A0=A0=A0 -- Public Internet access / =
Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_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).=A0 You may
Received on Thu Nov 30 2000 - 12:06:11 CST

Original text of this message

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