golmschenk
golmschenk

Reputation: 12384

MySQL - Change index column VARCHAR length?

I currently have a table with an index column the unique index column "name". Currently the column "name" is a varchar with length 25. I would like to increase this to 50. I'm attempting to use

alter table `meal_prices` modify `name` varchar(50);

to do this. However, this doesn't seem to affect the column. I have a feeling this isn't working because the column is an index column, but I'm not sure. Any suggestions? Thank you much.

Upvotes: 0

Views: 1519

Answers (1)

Tom
Tom

Reputation: 6663

Run show create table TABLENAME afterwards to verify the data type has changed.

Upvotes: 1

Related Questions