List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:November 1 2002 6:18am
Subject:Re: Questions about indexes
View as plain text  
At 20:15 -0800 10/31/02, Andre Kirchner wrote:
>Hi,
>
>is it possible in the mySQL to have an index that none
>of the values could be repeated except for a single
>value that could be repeated?

Yes, but the only value that can be repeated is NULL.

That's how UNIQUE indexes work for MyISAM and InnoDB tables
for columns that are declared to allow NULL values.

BDB allows just a single NULL value in UNIQUE indexes.

>The values of the column would be something like this
>
>'123'
>'245'
>'233'
>'XXX'
>'XXX'
>'027'
>
>where just the value XXX could be repeated.
>
>Thanks,
>
>Andre
>

Thread
Questions about indexesAndre Kirchner1 Nov
  • Re: Questions about indexesPaul DuBois1 Nov