Change ENUM Values

I am following an example in my book dealing with an ENUM data-type.

My table already has values in it, and I would like to change one ENUM value from “Admin” to “Administrator” and also change the corresponding field values.

How would I do this?

Debbie

rather tediously, i’m afraid

see http://forums.htmlcenter.com/databases/4568-altering-enum-set-data-type-mysql.html

just another example of why you should stay well clear of the evil SET and ENUM datatypes

but i’ll bet your book didn’t give you that type of advice :wink:

I was waiting for you to say that! (I’ve heard you don’t like ENUM!) :slight_smile:

but i’ll bet your book didn’t give you that type of advice :wink:

Well, you get what you pay for, and this book is far from advanced. But for a newbie like me, it is a good way to get up to speed on PHP and MySQL.

Once I get the author’s code working, I’ll go create my own site/code from scratch and try to learn from things like this.

Debbie

The book “SQL Antipatterns” covers a lot of the things that are often done wrong with databases. It has a whole chapter on avoiding using enum and what the alternatives are that you could use instead.

Good suggestion!

Debbie