Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Primary keys vs. unique indexes
This is a multi-part message in MIME format.
------=_NextPart_000_0086_01C05B30.A46AE2C0 Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
RE: Primary keys vs. unique indexesHello Lisa,
PRIMARY KEY means UNIQUE and NOT NULL...
Hope that explains..
Nikunj
What? Yes you can. I have anyway.=20
Can you give me an example of when that would not work?=20
Lisa Rutland Koivu=20
Oracle Database Administrator=20
Qode.com=20
4850 North State Road 7=20
Suite G104=20
Fort Lauderdale, FL 33319=20
V: 954.484.3191, x174=20 F: 954.484.2933=20 C: 954.658.5849=20
"The information contained herein does not express the opinion or = position of Qode.com and cannot be attributed to or made binding upon = Qode.com."
-----Original Message-----=20
From: james ellis [mailto:jellis24_gso_at_yahoo.com]=20
Sent: Thursday, November 30, 2000 11:51 AM=20
To: Multiple recipients of list ORACLE-L=20
Subject: Re: Primary keys vs. unique indexes=20
The main difference is you can not reference an unique=20 index with a foreign key.=20
__________________________________________________=20Do You Yahoo!?=20
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051=20 San Diego, California -- Public Internet access / Mailing Lists =
--------------------------------------------------------------------=20To REMOVE yourself from this mailing list, send an E-Mail message=20 to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in=20 the message BODY, include a line containing: UNSUB ORACLE-L=20 (or the name of mailing list you want to be removed from). You may=20 also send the HELP command for other information (like subscribing).=20
------=_NextPart_000_0086_01C05B30.A46AE2C0 Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>RE: Primary keys vs. unique indexes</TITLE> <META http-equiv=3DContent-Type content=3D"text/html; =charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT face=3DArial size=3D2>Hello Lisa,</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>PRIMARY KEY means UNIQUE and NOT=20NULL...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Hope that explains..</FONT></DIV> <DIV><FONT face=3DArial size=3D2></FONT> </DIV> <DIV><FONT face=3DArial size=3D2>Nikunj</FONT></DIV> <DIV> </DIV> <BLOCKQUOTE dir=3Dltr=20
target=3D_blank =
href=3D"http://www.qode.com">http://www.qode.com</A></FONT> </P>
<P><FONT size=3D2>"The information contained herein does not express =
the opinion=20
or position of Qode.com and cannot be attributed to or made binding =
upon=20
Qode.com."</FONT></P><BR>
<P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT =
size=3D2>From: james=20
ellis [<A=20
=
href=3D"mailto:jellis24_gso_at_yahoo.com">mailto:jellis24_gso_at_yahoo.com</A>]=
</FONT>=20
<BR><FONT size=3D2>Sent: Thursday, November 30, 2000 11:51 AM</FONT> =
<BR><FONT=20
size=3D2>To: Multiple recipients of list ORACLE-L</FONT> <BR><FONT=20
size=3D2>Subject: Re: Primary keys vs. unique indexes</FONT> </P><BR>
<P><FONT size=3D2>The main difference is you can not reference an =
unique</FONT>=20
<BR><FONT size=3D2>index with a foreign key. </FONT><BR><FONT =
size=3D2>---=20
cemail_at_sprintmail.com wrote:</FONT> <BR><FONT size=3D2>> =
</FONT><BR><FONT=20
size=3D2>> What is the difference between building a table =
and</FONT>=20
<BR><FONT size=3D2>> including</FONT> <BR><FONT size=3D2>> the =
primary key=20
versus building the table and then</FONT> <BR><FONT size=3D2>> =
having=20
creating</FONT> <BR><FONT size=3D2>> a unique index on the same =
keys? =20
When you create a</FONT> <BR><FONT size=3D2>> table with</FONT> =
<BR><FONT=20
size=3D2>> a primary key, doesn't Oracle store it as an =
index</FONT>=20
<BR><FONT size=3D2>> anyway?</FONT> <BR><FONT size=3D2>> =
</FONT><BR><FONT=20
size=3D2>> -----</FONT> <BR><FONT size=3D2>> Sent using =
MailStart.com=20
(</FONT> <BR><FONT size=3D2>> <A target=3D_blank=20
=
href=3D"http://MailStart.Com/welcome.html">http://MailStart.Com/welcome.h=
tml</A>=20
)</FONT> <BR><FONT size=3D2>> The FREE way to access your mailbox =
via any=20
web</FONT> <BR><FONT size=3D2>> browser, anywhere!</FONT> <BR><FONT =
size=3D2>> </FONT><BR><FONT size=3D2>> -- </FONT><BR><FONT =
size=3D2>>=20
Please see the official ORACLE-L FAQ:</FONT> <BR><FONT size=3D2>> =
<A=20
target=3D_blank =
href=3D"http://www.orafaq.com">http://www.orafaq.com</A></FONT>=20
<BR><FONT size=3D2>> -- </FONT><BR><FONT size=3D2>> Author: =
</FONT><BR><FONT=20
size=3D2>> INET: cemail_at_sprintmail.com</FONT> <BR><FONT =
size=3D2>> </FONT><BR><FONT size=3D2>> Fat City Network=20
Services -- (858) 538-5051 FAX:</FONT> =
<BR><FONT=20
size=3D2>> (858) 538-5051</FONT> <BR><FONT size=3D2>> San Diego, =
California -- Public =
Internet</FONT>=20
<BR><FONT size=3D2>> access / Mailing Lists</FONT> <BR><FONT=20
size=3D2>></FONT> <BR><FONT=20
=
size=3D2>----------------------------------------------------------------=----</FONT>=20
size=3D2>__________________________________________________</FONT>=20<BR><FONT size=3D2>Do You Yahoo!?</FONT> <BR><FONT size=3D2>Yahoo! = Shopping -=20
538-5051 FAX: (858) 538-5051</FONT> <BR><FONT size=3D2>San =
Diego,=20
California -- Public =
Internet access=20
/ Mailing Lists</FONT> <BR><FONT=20
=
size=3D2>----------------------------------------------------------------=----</FONT>=20