Forgot your password?
typodupeerror
This discussion has been archived. No new comments can be posted.

Altering tables in mysql

Comments Filter:
  • In this particular case, I had to add an auto-incrementing primary key, which was not described in the text. Luckily, the MySQL manual [mysql.com] led me to the solution:

    ALTER TABLE gastenboek ADD COLUMN id mediumint(9) auto_increment, ADD PRIMARY KEY(id);

    Before doing this, I had to drop the previous primary key:

    ALTER TABLE gastenboek DROP PRIMARY KEY;

I cannot believe that God plays dice with the cosmos. -- Albert Einstein, on the randomness of quantum mechanics

Working...