Oracle FAQ Your Portal to the Oracle Knowledge Grid

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

Re: Primary keys vs. unique indexes

From: Nikunj Gupta <>
Date: Fri, 1 Dec 2000 00:50:04 -0800
Message-Id: <>

This is a multi-part message in MIME format.

------=_NextPart_000_0086_01C05B30.A46AE2C0 Content-Type: text/plain;

Content-Transfer-Encoding: quoted-printable

RE: Primary keys vs. unique indexesHello Lisa,


Hope that explains..


  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
  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 and cannot be attributed to or made binding upon ="

  -----Original Message-----=20
  From: james ellis []=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

  Do You Yahoo!?=20
  Yahoo! Shopping - Thousands of Stores. Millions of Products.=20
  Please see the official ORACLE-L FAQ:   --=20
  Author: james ellis=20

  Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051=20   San Diego, California -- Public Internet access / Mailing Lists =

  To REMOVE yourself from this mailing list, send an E-Mail message=20   to: (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;

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; =
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello Lisa,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PRIMARY KEY means UNIQUE and NOT=20
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Hope that explains..</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Nikunj</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20

style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; = BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">   <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>   <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: = black"><B>From:</B>=20
  <A href=3D"">Koivu, = Lisa</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
  href=3D"">Multiple recipients of list = ORACLE-L</A>=20
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, November 30, = 2000 09:20=20
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> RE: Primary keys vs. = unique=20
  <P><FONT size=3D2>What?&nbsp; Yes you can.&nbsp; I have anyway. = </FONT></P>
  <P><FONT size=3D2>Can you give me an example of when that would not = work?</FONT>=20
  <P><FONT size=3D2>Lisa Rutland Koivu</FONT> <BR><FONT size=3D2>Oracle = Database=20
  Administrator</FONT> <BR><FONT size=3D2></FONT> <BR><FONT = size=3D2>4850=20
  North State Road 7</FONT> <BR><FONT size=3D2>Suite G104</FONT> = <BR><FONT=20
  size=3D2>Fort Lauderdale, FL&nbsp; 33319</FONT> </P>   <P><FONT size=3D2>V: 954.484.3191, x174</FONT> <BR><FONT size=3D2>F: = 954.484.2933=20
  </FONT><BR><FONT size=3D2>C: 954.658.5849</FONT> <BR><FONT size=3D2><A =

  target=3D_blank =
href=3D""></A></FONT> </P>   <P><FONT size=3D2>"The information contained herein does not express = the opinion=20
  or position of and cannot be attributed to or made binding = upon=20"</FONT></P><BR>
  <P><FONT size=3D2>-----Original Message-----</FONT> <BR><FONT = size=3D2>From: james=20
  ellis [<A=20
href=3D""></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 wrote:</FONT> <BR><FONT size=3D2>&gt; = </FONT><BR><FONT=20
  size=3D2>&gt; What is the difference between building a table = and</FONT>=20
  <BR><FONT size=3D2>&gt; including</FONT> <BR><FONT size=3D2>&gt; the = primary key=20
  versus building the table and then</FONT> <BR><FONT size=3D2>&gt; = having=20
  creating</FONT> <BR><FONT size=3D2>&gt; a unique index on the same = keys?&nbsp;=20
  When you create a</FONT> <BR><FONT size=3D2>&gt; table with</FONT> = <BR><FONT=20
  size=3D2>&gt; a primary key, doesn't Oracle store it as an = index</FONT>=20
  <BR><FONT size=3D2>&gt; anyway?</FONT> <BR><FONT size=3D2>&gt; = </FONT><BR><FONT=20
  size=3D2>&gt; -----</FONT> <BR><FONT size=3D2>&gt; Sent using =
  (</FONT> <BR><FONT size=3D2>&gt; <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>&gt; The FREE way to access your mailbox = via any=20
  web</FONT> <BR><FONT size=3D2>&gt; browser, anywhere!</FONT> <BR><FONT =

  size=3D2>&gt; </FONT><BR><FONT size=3D2>&gt; -- </FONT><BR><FONT = size=3D2>&gt;=20
  Please see the official ORACLE-L FAQ:</FONT> <BR><FONT size=3D2>&gt; = <A=20
  target=3D_blank =
href=3D""></A></FONT>=20   <BR><FONT size=3D2>&gt; -- </FONT><BR><FONT size=3D2>&gt; Author: = </FONT><BR><FONT=20
  size=3D2>&gt;&nbsp;&nbsp; INET:</FONT> <BR><FONT =

  size=3D2>&gt; </FONT><BR><FONT size=3D2>&gt; Fat City Network=20   Services&nbsp;&nbsp;&nbsp; -- (858) 538-5051&nbsp; FAX:</FONT> = <BR><FONT=20
  size=3D2>&gt; (858) 538-5051</FONT> <BR><FONT size=3D2>&gt; San Diego, =

  California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public = Internet</FONT>=20
  <BR><FONT size=3D2>&gt; access / Mailing Lists</FONT> <BR><FONT=20   size=3D2>&gt;</FONT> <BR><FONT=20

  <BR><FONT size=3D2>&gt; To REMOVE yourself from this mailing list, = send=20
  an</FONT> <BR><FONT size=3D2>&gt; E-Mail message</FONT> <BR><FONT = size=3D2>&gt;=20
  to: (note EXACT spelling of</FONT> <BR><FONT = size=3D2>&gt;=20
  'ListGuru') and in</FONT> <BR><FONT size=3D2>&gt; the message BODY, = include a=20
  line containing: UNSUB</FONT> <BR><FONT size=3D2>&gt; ORACLE-L</FONT> = <BR><FONT=20
  size=3D2>&gt; (or the name of mailing list you want to be = removed</FONT>=20
  <BR><FONT size=3D2>&gt; from).&nbsp; You may</FONT> <BR><FONT = size=3D2>&gt; also=20
  send the HELP command for other information</FONT> <BR><FONT = size=3D2>&gt; (like=20
  subscribing).</FONT> </P><BR>
  <P><FONT =
  <BR><FONT size=3D2>Do You Yahoo!?</FONT> <BR><FONT size=3D2>Yahoo! = Shopping -=20
  Thousands of Stores. Millions of Products.</FONT> <BR><FONT = size=3D2><A=20
href=3D""></A></FONT>= =20
  <BR><FONT size=3D2>-- </FONT><BR><FONT size=3D2>Please see the = official ORACLE-L=20
  FAQ: <A target=3D_blank=20
  href=3D""></A></FONT> = <BR><FONT=20
  size=3D2>-- </FONT><BR><FONT size=3D2>Author: james ellis</FONT> = <BR><FONT=20
  size=3D2>&nbsp; INET:</FONT> </P>   <P><FONT size=3D2>Fat City Network Services&nbsp;&nbsp;&nbsp; -- (858) =

  538-5051&nbsp; FAX: (858) 538-5051</FONT> <BR><FONT size=3D2>San = Diego,=20
  California&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -- Public = Internet access=20
  / Mailing Lists</FONT> <BR><FONT=20

  <BR><FONT size=3D2>To REMOVE yourself from this mailing list, send an = E-Mail=20
  message</FONT> <BR><FONT size=3D2>to: (note EXACT = spelling=20
  of 'ListGuru') and in</FONT> <BR><FONT size=3D2>the message BODY, = include a line=20
  containing: UNSUB ORACLE-L</FONT> <BR><FONT size=3D2>(or the name of = Received on Fri Dec 01 2000 - 02:50:04 CST

Original text of this message