Follow Slashdot blog updates by subscribing to our blog RSS feed

 



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;

"Consequences, Schmonsequences, as long as I'm rich." -- "Ali Baba Bunny" [1957, Chuck Jones]

Working...