运行
select * from table where id in (select in from othertable)
出现:
collation是SQL_Latin1_General_CP1_CI_AS,而SQL Server的默认是Chinese_PRC_CI_AS。
解决方法:修改othertable的collation
后边有更详细的reference
[@more@]我就决定去修改原来aspnet_regsql使用的sql文件。
原来的sql文件没有包含有collation的东西的。我在每个字符数据类型的字段都加上collate database_default 。
但一般这些都是在SELECT语句中使用就OK了。
不能如此,否则会天下大乱的。我改用alter database [DB Name] collate Chinese_PRC_CI_AS 来把原来的数据库的Collation 改为跟SQL Server的Collaction 一样。
Reference:
http://www.umachandar.com/technical/SQL2000Scripts/Main10.htm
http://www.umachandar.com/technical/SQL2000Scripts/UtilitySPs/Main8.htm
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/1697933/viewspace-914519/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/1697933/viewspace-914519/