Chinaunix首页 | 论坛 | 博客
  • 博客访问: 290234
  • 博文数量: 163
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: -40
  • 用 户 组: 普通用户
  • 注册时间: 2017-03-08 00:28
文章分类

全部博文(163)

文章存档

2015年(2)

2014年(35)

2013年(28)

2012年(30)

2011年(22)

2010年(14)

2009年(8)

2008年(13)

2007年(11)

分类: 数据库开发技术

2011-05-24 19:07:01

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
 
 
阅读(2770) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~