List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:April 20 1999 6:55pm
Subject:Re: Problem with create unique index
View as plain text  
Miguel Oliveira wrote:
> Hello,
> 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.
> regards,
> Miguel Oliveira
> E-mail: mailto:miguel@stripped
> URL:
> PGP key: finger://miguel@stripped

alter table users change alias alias char(16) not null

you may have to change char(16) to what is appropriate
for you

Sasha Pachev (home) (work)
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