mysql 不同编码表字段比较时出现 illegal mix of collations

xiaoxiao2026-03-11  13

出错语句: select * from `db1`.`table1` as `table1`,`db2.`table2` as `table2` where `table1`.`username`=`table1`.`username`; table1和table2使用不同编码,提示illegal mix of collations .. 我的解决办法是 select * from `db1`.`table1` as `table1`,`db2.`table2` as `table2` where encode(`table1`.`username`,'mykey')=encode(`table1`.`username`,'mykey');
转载请注明原文地址: https://www.6miu.com/read-5045684.html

最新回复(0)