| varchar类型的字段如何存储中文(SQL Server 2008/2008 R2/2012) |
当Varchar类型字段的Collation属性设置为Latin_General时,insert或者update中文时,不能正常存储,显示为问号。 SXqbLh http://blog.numino.net/ 只有修改为collation属性为如下之一: giYfzF http://blog.numino.net/ Chinese_PRC_Stroke_90_BIN 7703dD http://blog.numino.net/ Chinese_PRC_90_CI_AS FB3Txl http://blog.numino.net/ 同时,insert或者update时,把汉字值使用unicode标示符进行转换。 0xoaYW http://blog.numino.net/ 例如,N'中文', VUu06J http://blog.numino.net/ INSERT INTO [dbo].[tbName] ([bb]) VALUES (N'中文xx') JL1krD http://blog.numino.net/ varchar类型字段才能够正常存储并显示汉字
|
|