| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Jochem van Dieten | Date: | April 26 2005 1:32pm |
| Subject: | Re: why NOT NULL in PRIMARY key?? | ||
| View as plain text | |||
On 4/26/05, Jigal van Hemert wrote: > http://dev.mysql.com/doc/mysql/en/silent-column-changes.html > mentions that "Columns that are part of a PRIMARY KEY are made NOT NULL even > if not declared that way. " > > And http://dev.mysql.com/doc/mysql/en/create-table.html tells me that "A > PRIMARY KEY is a unique KEY where all key columns must be defined as NOT > NULL. If they are not explicitly declared as NOT NULL, MySQL declares them > so implicitly (and silently). " > > Why is this? Because the SQL standard says so. Jochem
