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

Home -> Community -> Usenet -> c.d.o.server -> Re: URGENT: Primary key vs Unique Index

Re: URGENT: Primary key vs Unique Index

From: Bill Bearden <bbearden_at_quincy.glenayre.com>
Date: 1997/02/17
Message-ID: <01bc1cd6$53eb4d40$1d51e69d@qcy_erp_6>#1/1

There are two important differences between Primary and Unique Keys.

  1. There can only be one Primary Key on a table. There can be more than one column with Unique Key.
  2. Primary Key columns can't contain NULL. Unique Key columns can.

If you pick one column per table and that column doesn't contain NULLs, you will be ok.

Bill Bearden
Bill Bearden Consulting
bbearden_at_bcl.net

JJ Reynolds <jjr_at_healthfare.com> wrote in article <3304B6F7.456B_at_healthfare.com>...
> I am setting up a symmetric replication environment. Most (but not all)
> of the tables in the schema have unique indexes instead of primary keys.
> For replication manager to work properly, there needs to be a primary
> key on the table. I am tempted to just write SQL statements to convert
> the unique indexes to primary keys. What problems would I have by doing
> this? What is the difference to Oracle?
>
> I need to complete this by Monday, so quick responses are greatly
> appreciated. Also, please reply to my email address rather than the
> newsgroup/list, as I'll be busy with Oracle and can't wade through the
> messages :).
>
>
> TIA,
>
>
> jjr_at_healthfare.com
>
  Received on Mon Feb 17 1997 - 00:00:00 CST

Original text of this message

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