Hi,
> I am trying to set up a table which has an auto_incrementing ID
> and a unique username. I set up the username to be the primary
> key (as it needs to be unique) and the ID to be auto_Increment.
> This came up with an error and said that the index column must be
> the auto_increment.
the username does not have to be primary key to be required to be
unique. you can create the table as following:
CREATE TABLE users (
id int not null auto_increment primary key,
username varchar(10) not null,
/.. the rest of the fields ../
unique (username)
);
Rgds,
Tfr
--==< tfr@stripped >==< http://tfr.cafe.ee/ >==< +1-504-4467425 >==--