Yes, this does make a difference on unique indexes the best I can remember.
Because PK columns automatically create a unique index it stands to reason
that unique indexes cannot be created on other columns that are Nullable.
set the column to be NOT NULL then create your index, should work for ya.
After this, if you cannot create a unique index but can create a regular one
then you have duplicates in the column.
-----Original Message-----
From: Hermann Himmelbauer
To: Kevin Wilson; '[EMAIL PROTECTED] '
Sent: 9/22/2003 1:12 AM
Subject: Re: Adding a second unique index
On Monday 22 September 2003 05:51, Kevin Wilson wrote:
> You may have already thought of this but I like to start with the
things I
> always forget.
>
> Is the column you are trying to create the unique index on Nullable?
You mean, that the column may be Null? Does this make any difference? To
my
mind Null-values are considered as unique, so there is no conflict.
My table looks like this:
CREATE TABLE "MOVIE"
(
"MOVIEID" Fixed(12,0) DEFAULT SERIAL PRIMARY KEY,
"TITEL" Varchar (100) ASCII NOT NULL,
"JAHR" Char (4) NOT NULL,
"SPRACHE" Varchar (20) ASCII NOT NULL,
"FORMAT" Varchar (10) ASCII NOT NULL,
"QUALITAET" Char (1) ASCII NOT NULL,
"CDNO" Varchar (25) ASCII NOT NULL,
"DATEINAME" Varchar (100) ASCII NOT NULL,
"IMDBNO" Varchar (10) ASCII,
"GENRE" Varchar (100) ASCII,
"INHALT" Varchar (1000) ASCII,
"SPIELER" Varchar (300) ASCII
)
... and the SQL-Command like this:
create unique index m1 on movie(imdbno)
... this leads to the following error:
[SAP AG][LIBSQLOD SO][SAP DB]Integrity constraint violation;250 POS(1)
Duplicate secondary key.
Best Regards,
Hermann
--
[EMAIL PROTECTED]
GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9 4902 64B4 D16B 2998 93C7
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]