tempdb 的排序规则是Latin1_General_100_CI_AI
. 数据库的排序规则也是Latin1_General_100_CI_AI
。然而下面的 SQL 语句:
SELECT *
FROM ##CitiesMapping AS cm
INNER JOIN Cities ON cm.CityName=Cities.Name
返回:
Cannot resolve the collation conflict between "SQL_Latin1_General_CP1_CI_AS" and "Latin1_General_100_CI_AI" in the equal to operation.
服务器默认排序规则也是Latin1_General_100_CI_AI