All - Running MySQL 4.0.17 under Red Hat 9, using MyISAM tables.

I'm trying to add the auto_increment attribute to column in a table that already has a primary key defined. Here is the table I'm trying to create:


CREATE TABLE IF NOT EXISTS dataTypes ( id int unsigned NOT NULL AUTO_INCREMENT KEY, dataType varchar(64) PRIMARY KEY, description tinytext, dbName tinytext, directory tinytext, updated timestamp, UNIQUE (dataType))

This create statement works w/o the id column. However, when I add the id column, I get an error on table creation. Is it complaining because it thinks I'm trying to add a second primary key (since all of the AUTO_INCREMENT attribute ints are unique)?

What's the easiest way to do this?

Thanks,
Mark


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to