Hi Neil. On Wed, Jun 04, 2003 at 02:33:22AM -0230, Neil Zanella wrote: > I believe that MySQL is in error in reporting the following message just > because I did not specify that the PRIMARY KEY should not be NULL. These > days there are standards and SQL92, AFAIK, specifies that if the primary > key is not explicitly set to NOT NULL then the RDBMS should automatically > and silently assume the user means NOT NULL. After all, any half decent > book on relational databases out there will tell you that primary keys > cannot be null. So why does MySQL do it this way. By doing this MySQL is > breaking the portability of my standard SQL code which works so well with > postgreSQL and Oracle 9i. So why donesn't MySQL play nice and abide to > the standard? Is this fixed in MySQL 4? I am running MySQL 3.23.54a as > distributed with Red Hat 9, which, for some reason has not decided to > update their mysql RPMS to MySQL 4 for that release but I am interesting > in knowing if this has been fixed in MySQL. I think one of MySQL's goals > should be to support standards such as SQL92 (if not SQL99). Even if > internally some things don't work as expected, at a minimum, the > parsers should be compatible as much as possible, including > standard data types and assuming primary keys are not null > by default.
This bug was fixed in MySQL 4.0.13, after it was reported to our bug tracking system here: http://bugs.mysql.com/390 As Peter Gulutzan notes in a comment to that bug, the previous behavior was consistent with the SQL-92 standard, but that has been relaxed in SQL-99, and we are currently working towards SQL-99 compliance. Jim Winstead MySQL AB -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]