List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 20 1999 7:12pm
Subject:Re: Problem with create unique index
View as plain text  
At 3:38 PM -0500 4/20/99, Miguel Oliveira wrote:
>I'm trying to create an unique index like this (to avoid login duplicates):
>CREATE UNIQUE INDEX alias_index ON users(alias)
>I always get this answer from mysql:
>Couldn't  create  the  alias  index on the users table!  (Column 'alias' is
>used with UNIQUE or INDEX but is not defined as NOT NULL)
>I've this working in an older version of mysql.  At home i'm using 3.22.19b
>and gives me that error.

It means exactly what it says. :-)   If you run "DESCRIBE users", it will
say YES in the NULL column, I expect.  You need to modify the column
so it can't take NULL values, since indexes can't be created on nullable

Paul DuBois, paul@stripped
Northern League Chronicles:
Problem with create unique indexMiguel Oliveira20 Apr
  • Re: Problem with create unique indexPaul DuBois20 Apr
  • Re: Problem with create unique indexThimble Smith20 Apr
  • Re: Problem with create unique indexSasha Pachev20 Apr
  • Re: problem with mysql and myodbc--from saikoneruTimothy Houck22 Sep
Re: problem with mysql and myodbc--from saikoneruAjit Kolhatkar22 Sep