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: Joel Garry <joelga_at_rossinc.com>
Date: 1997/02/25
Message-ID: <1997Feb25.200733.22348@rossinc.com>#1/1

In article <33133DFD.6162_at_mediadata.com.sg> mars_at_mediadata.com.sg writes:
>Bill Bearden wrote:
>>
>> 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.
>>
>
>Pardon my ignorance but why can't a primary key be NULL ? Is it a rule
>or is it specific to just Oracle ?

By definition, a NULL is for missing, unknown, or inapplicable data. A primary key uniquely identifies a row. So a blank could be a key, but a null can't - it is a rule.

>
>rgds,
>mars

-- 
Joel Garry               joelga_at_rossinc.com               Compuserve 70661,1534
These are my opinions, not necessarily those of Ross Systems, Inc.   <> <>
%DCL-W-SOFTONEDGEDONTPUSH, Software On Edge - Don't Push.            \ V /
panic: ifree: freeing free inodes...                                   O
Received on Tue Feb 25 1997 - 00:00:00 CST

Original text of this message

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