分类: Mysql/postgreSQL
2006-03-01 17:55:32
gbk
(GBK Simplified Chinese) collations:
gbk_bin
gbk_chinese_ci
(default)
这样虽然都是gbk,但是还是有可能不一样,如果要
update resource_bjie.usr_person u, authdb.user_info i set u.name=i.name
可能会出现错误:
Illegal mix of collations (gbk_chinese_ci,IMPLICIT) and (gbk_bin,IMPLICIT) for operation '=', SQL State: HY000, Error Code: 1267
解决办法
ALTER TABLE usr_person CONVERT TO CHARACTER SET gbk COLLATE gbk_bin