From: Martijn Tonies Date: April 26 2005 2:01pm Subject: Re: why NOT NULL in PRIMARY key?? List-Archive: http://lists.mysql.com/mysql/183154 Message-Id: <052601c54a68$6bb363e0$3802a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit > Not every DBMS... > > MSSQL: > Create Unique Index > Microsoft(r) SQL Server(tm) checks for duplicate values when the index > is created (if data already exists) and checks each time data is added > with an INSERT or UPDATE statement. If duplicate key values exist, the > CREATE INDEX statement is canceled and an error message giving the first > duplicate is returned. Multiple NULL values are considered duplicates > when UNIQUE index is created. > > > SYBASE: > Create Unique Index > Prohibits duplicate index (also called key) values. The system checks > for duplicate key values when the index is created (if data already > exists), and checks each time data is added with an insert or update. If > there is a duplicate key value or if more than one row contains a null > value, the command is aborted and an error message giving the duplicate > is printed. An unique index is not a primary key constraint. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server Upscene Productions http://www.upscene.com