SELECT * FROM table_a a where a.id NOT IN (SELECT b.id FROM table_b b);
先将两个数据表的编码统一,如果table_a的编码为utf8_general_ci,那么将这个表的编码修改下执行以下语句
alert table_a CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;再执行select语句,这样就可以解决编码冲突了;
SELECT * FROM table_a a where a.id NOT IN (SELECT b.id FROM table_b b);
先将两个数据表的编码统一,如果table_a的编码为utf8_general_ci,那么将这个表的编码修改下执行以下语句
alert table_a CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;再执行select语句,这样就可以解决编码冲突了;