无法解决 equal to 操作中 "SQL_Latin1_General_CP1_CI_AS" 和 "Chinese_PRC_CI_AS" 之间的排序规则冲突。

来源:互联网 发布:淘宝卖书需要什么证 编辑:程序博客网 时间:2024/04/30 14:41

无法解决 equal to 操作中 "SQL_Latin1_General_CP1_CI_AS" 和 "Chinese_PRC_CI_AS" 之间的排序规则冲突。

select * from table1 where ID not in (select ID from table2 )  

无法解决 equal to 操作中 "SQL_Latin1_General_CP1_CI_AS" 和 "Chinese_PRC_CI_AS" 之间的排序规则冲突。
--解决办法
select * from table1 where ID COLLATE Chinese_PRC_CI_AS not in (select ID from table2 )
  
在查询字段连接条件后加上:COLLATE Chinese_PRC_CI_AS 即可