开发者

Mysql column to utf8_bin

开发者 https://www.devze.com 2022-12-12 23:19 出处:网络
I have a table in mysql. I want to change one of the columns to have utf8_bin as it\'s collate attribute.

I have a table in mysql. I want to change one of the columns to have utf8_bin as it's collate attribute. I know the command to do for whole table is like: ALTER TABLE temp CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;

But how do I do it for individual columns?

Thanks开发者_如何转开发 for the help


It's right in the manual

Their example

ALTER TABLE t1 MODIFY
    col1 VARCHAR(5)
      CHARACTER SET latin1
      COLLATE latin1_swedish_ci;
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号