![]() | |
#11
| |||
| |||
|
|
"Paul G. Brown" <paul_geoffrey_brown (AT) yahoo (DOT) com> wrote in message news:57da7b56.0308061732.4e0c437 (AT) posting (DOT) google.com... joe.celko (AT) northface (DOT) edu (--CELKO--) wrote in message n The part I don't understand is why we never required a PRIMARY KEY constraint on all tables. Because, on occasion, a DBMS needs to be able to swallow a file that looks like this: --BEGIN-- 1 1 1 2 1 1 2 1 And I have a table that looks like this: a b a c a d a e b a b d c a c e c b purely as a join condition assistor, (it helped massively and reduced query times from 5 to 0.5 seconds) |
#12
| |||
| |||
|
|
And I have a table that looks like this: a b a c a d a e b a b d c a c e c b purely as a join condition assistor, (it helped massively and reduced query times from 5 to 0.5 seconds) Your table has a candidate key--both columns. |
#13
| |||
| |||
|
|
But I was referring to a multi-field key, in that case one (or more) fields [sic] can be null. Nope. If you use the PRIMARY KEY constraint, **all** columns must be NOT NULL. Trust me; I did spend ten years on the Standards Committee. Now, a UNIQUE () constraint can have NULLs. The part I don't understand is why we never required a PRIMARY KEY constraint on all tables. |
![]() |
| Thread Tools | |
| Display Modes | |
| |