国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁(yè) > 數(shù)據(jù)庫(kù) > SQL Server > 正文

SQL SERVER中文亂碼解釋~

2024-08-31 00:49:09
字體:
來(lái)源:轉(zhuǎn)載
供稿:網(wǎng)友

run sp_help "your table" to get the collation setting for the column.  in order to store chinese correctly, you should set the collation be:
    chinese_prc_ci_as
 or chinese_stoke_ci_as

char/varchar data type is ansi char which must define a code page. if you set the collation be sql_latin1_general_cp_ci_as, it can only store latin characters. in order to store chinese character in a char column, you have to set the collation be  chinese_prc_ci_as  or chinese_stoke_ci_as which has a chinese code page defined.

nchar/nvarchar collumn is different, you can store any unicode character include enlish, chinese, japanese in one column.

in term of input chinese character, the character constant will use database's collation. thus, if the database's collation is not chinese collation, there is no way to input chinese char/varchar data, such as 
'中文' will be treated as '??'.  but for nvarchar/ncar, you can input it
on any collation. such as  n'中文' will be treated as two unicode chars


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 新泰市| 余江县| 阿拉尔市| 彭阳县| 武乡县| 寿光市| 大安市| 兴文县| 广水市| 边坝县| 白玉县| 庐江县| 广昌县| 金寨县| 玉溪市| 响水县| 海门市| 八宿县| 闻喜县| 滨州市| 和顺县| 仙居县| 江油市| 轮台县| 隆安县| 鲁甸县| 清新县| 勃利县| 丽水市| 巴林右旗| 灵石县| 科尔| 岐山县| 高州市| 宁化县| 浪卡子县| 汤原县| 阿尔山市| 阿拉善右旗| 荥经县| 博兴县|