Hello,
I have a problem with the command ALTER TABLE.
For example, this simple table "test" :
+---------+---------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------+---------------+------+-----+---------+----------------+
| id | int(10) | | PRI | NULL | auto_increment |
| texte | varchar(255) | YES | | NULL | |
+---------+---------------+------+-----+---------+----------------+
I want to modify the id column and convert it to tinyint type. The command line
is :
ALTER TABLE test MODIFY COLUMN id tinyint(3) unsigned NOT NULL PRIMARY KEY
default NULL auto_increment;
I launch it and I have this error :
ERROR 1068: Multiple primary key defined
Obviously if I remove the PRIMARY KEY, it does not begin squalling...
The problem is that it's an automatic program which launches the ALTER TABLE so
I'll be happy if I can keep the "PRIMARY KEY".
This was tested on a MySQL 4.0.2 as well as on 3.23.51.
Is it a limit of ALTER ? A syntax error ?... Thank for your answers and sorry
for my english :)
Florent.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php