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

Home -> Community -> Usenet -> comp.databases.theory -> Re: Primary key on one or two fields

Re: Primary key on one or two fields

From: Bernard Peek <bap_at_shrdlu.com>
Date: Tue, 12 Aug 2003 00:54:50 +0100
Message-ID: <44nh36IKzCO$Ewxh@diamond9.demon.co.uk>


In message <a264e7ea.0308081156.4cd72b48_at_posting.google.com>, --CELKO-- <joe.celko_at_northface.edu> writes

>CREATE TABLE Rate_Revisions
>(rate_name VARCHAR(20) DEFAULT ‘{{unknown}}'
> NOT NULL PRIMARY KEY,
Nitpick: primary key's can't be null, for good reason. Substituting a default value doesn't improve the situation. It would be better for an insert without a valid key to fail than to have even one record with an unknown key.

-- 
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.
Received on Mon Aug 11 2003 - 18:54:50 CDT

Original text of this message

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