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_at_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 Tue Aug 12 2003 - 01:54:50 CEST

Original text of this message