Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: URGENT: Primary key vs Unique Index
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... OReceived on Tue Feb 25 1997 - 00:00:00 CST