如下SQL报错:
select a.id from #t1 a inner join #t2 b on a.id =b.id
错误:Cannot re solve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.
报错原因:两个跨库的表的collation不一致
改成如下即可
select a.id from #t1 a inner join #t2 b on a.id collate Chinese_PRC_CI_AS =b.id