how could a foreign key ever be NULL?

From: Terrence Brannon <metaperl(at)mac(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: how could a foreign key ever be NULL?
Date: 2001-12-17 11:38:09
Message-ID: 8BBB36A0-F2E2-11D5-92F7-003065C2A10C@mac.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

The Momjian book states:

A single-column foreign key is either NULL or matches a primary key

But the problem I have with this statement is that a primary key
cannot be null or duplicate. And since the foreign key references
a value that is neither null or duplicate, how could it ever be
NULL?

In response to

  • Indices at 2001-12-11 03:48:54 from sharmad

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tarun Galarani 2001-12-17 11:41:02 Difference between DB2 7.0 & latest version of PostgresSQL?
Previous Message Terrence Brannon 2001-12-17 10:41:09 Re: Numbering Rows (SEQUENCE, OID) questions