sql server跨库查询与不同字符集
author:YW
email:
当两个sqlserver数据库的字符集不一致时,直接作联接查询会报一个字符集错误
大致如下: Cannot resolve the collation conflict between "Chinese_PRC_CI_AI_WS" and "Albanian_CI_AI_WS" in the equal to operation.
排除这个问题的方法就是在查询的时候指定字符集
select A.name1,B.name1 from tableA A inner join tableB B
on A.id = B.id collate Chinese_PRC_CI_AI_WS
阅读(2864) | 评论(0) | 转发(0) |