排序规则不一致 Cannot re solve the collation conflict between "Chinese_PRC_CI_AS" and "SQL_Latin1_General_CP1_CI_AS" in the equal to operation.

如下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

  

posted @ 2017-02-22 13:53  吃肉的兔子  阅读(441)  评论(0)    收藏  举报