您必须通过MODIFY更改CHANGE
第一步是将列转换为二进制数据类型,该类型删除现有字符集信息而不执行任何字符转换:
ALTER TABLE something MODIFY name BLOB;
下一步是将列转换为具有正确字符集的非二进制数据类型:
ALTER TABLE something MODIFY name VARCHAR(12) CHARACTER SET hebrew COLLATE hebrew_bin;
或试试这个:
ALTER TABLE something MODIFY name VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_unicode_ci
阅读更多:
请注意,对列运行任何MODIFY或CHANGE操作(在实际意义上)将删除列as per the documentation上的任何默认值或注释.
When you use CHANGE or MODIFY, column_definition must include the data type and all attributes that should apply to the new column, other than index attributes such as PRIMARY KEY or UNIQUE. Attributes present in the original definition but not specified for the new definition are not carried forward.