
Journal jvervloet's Journal: Altering tables in mysql 1
MySQL is a very powerful database, if you remember its syntax. One of the things I always forget, is how to alter a table.
MySQL is a very powerful database, if you remember its syntax. One of the things I always forget, is how to alter a table.
"Consequences, Schmonsequences, as long as I'm rich." -- "Ali Baba Bunny" [1957, Chuck Jones]
Adding an auto-incrementing primary key. (Score:1)
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:
Before doing this, I had to drop the previous primary key: