真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

mysql字符集校對(duì)規(guī)則有哪些

這篇文章給大家介紹MySQL字符集校對(duì)規(guī)則有哪些,內(nèi)容非常詳細(xì),感興趣的小伙伴們可以參考借鑒,希望對(duì)大家能有所幫助。

創(chuàng)新互聯(lián)公司主要從事網(wǎng)站設(shè)計(jì)、成都網(wǎng)站設(shè)計(jì)、網(wǎng)頁設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)尋烏,10多年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):18982081108

目前mysql默認(rèn)的校對(duì)規(guī)則除binary charset為binary外,都為ci,即大小寫不敏感,既然這種校驗(yàn)規(guī)則容易出問題,那么為什么還要默認(rèn)為這樣的規(guī)則呢?有句古話叫做存在即合理,不知道為什么mysql采用了這樣的默認(rèn)規(guī)則呢?

查了下oracle中的校驗(yàn)規(guī)則,默認(rèn)為binary,順便查了下文檔關(guān)于該參數(shù)的解釋:

http://download.oracle.com/docs/cd/B28359_01/server.111/b28320/initparams145.htm#REFRN10127

Note:

Setting NLS_SORT to anything other than BINARY causes a sort to use a full table scan, regardless of the path chosen by the optimizer. BINARY is the exception because indexes are built according to a binary order of keys. Thus the optimizer can use an index to satisfy the ORDER BY clause when NLS_SORT is set to BINARY. If NLS_SORT is set to any linguistic sort, the optimizer must include a full table scan and a full sort in the execution plan.

ps:題外--

前些日子還感嘆,mysql的文檔結(jié)構(gòu)不說怎么樣吧,但是mysql有一個(gè)亮點(diǎn)就是注冊(cè)用戶可以在在線文檔上添加comments,這些comments的用途想想都該知道的吧。

不經(jīng)意間發(fā)現(xiàn)oracle 11g文檔也增加了相應(yīng)的模塊,oracle總是在不斷吸收別人的長處不斷改進(jìn),贊一個(gè)!

回到正題,看了oracle關(guān)于該參數(shù)的說明,那不由得想到,mysql可能默認(rèn)是按照linguistic語義來進(jìn)行存儲(chǔ)的吧,而這或許也是其多數(shù)用戶需求?暫時(shí)沒有答案了。

附1:mysql中默認(rèn)字符集校驗(yàn)規(guī)則:

alipay@(none) 10:11:56>show charset;
+----------+-----------------------------+---------------------+--------+
| Charset | Description | Default collation | Maxlen |
+----------+-----------------------------+---------------------+--------+
| dec8 | DEC West European | dec8_swedish_ci | 1 |
| cp850 | DOS West European | cp850_general_ci | 1 |
| hp8 | HP West European | hp8_english_ci | 1 |
| koi8r | KOI8-R Relcom Russian | koi8r_general_ci | 1 |
| latin1 | cp1252 West European | latin1_swedish_ci | 1 |
| latin2 | ISO 8859-2 Central European | latin2_general_ci | 1 |
| swe7 | 7bit Swedish | swe7_swedish_ci | 1 |
| ascii | US ASCII | ascii_general_ci | 1 |
| hebrew | ISO 8859-8 Hebrew | hebrew_general_ci | 1 |
| koi8u | KOI8-U Ukrainian | koi8u_general_ci | 1 |
| greek | ISO 8859-7 Greek | greek_general_ci | 1 |
| cp1250 | Windows Central European | cp1250_general_ci | 1 |
| gbk | GBK Simplified Chinese | gbk_chinese_ci | 2 |
| latin5 | ISO 8859-9 Turkish | latin5_turkish_ci | 1 |
| armscii8 | ARMSCII-8 Armenian | armscii8_general_ci | 1 |
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
| cp866 | DOS Russian | cp866_general_ci | 1 |
| keybcs2 | DOS Kamenicky Czech-Slovak | keybcs2_general_ci | 1 |
| macce | Mac Central European | macce_general_ci | 1 |
| macroman | Mac West European | macroman_general_ci | 1 |
| cp852 | DOS Central European | cp852_general_ci | 1 |
| latin7 | ISO 8859-13 Baltic | latin7_general_ci | 1 |
| cp1251 | Windows Cyrillic | cp1251_general_ci | 1 |
| cp1256 | Windows Arabic | cp1256_general_ci | 1 |
| cp1257 | Windows Baltic | cp1257_general_ci | 1 |
| binary | Binary pseudo charset | binary | 1 |
| geostd8 | GEOSTD8 Georgian | geostd8_general_ci | 1 |
+----------+-----------------------------+---------------------+--------+
27 rows in set (0.00 sec)

附2:oracle nls_sort

ops$admin@test>select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi

ops$admin@test>select * from v$nls_parameters where parameter ='NLS_SORT';

PARAMETER VALUE
---------------------------------------------------------------- ----------------------------------------------------------------
NLS_SORT BINARY

關(guān)于mysql字符集校對(duì)規(guī)則有哪些就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。


當(dāng)前文章:mysql字符集校對(duì)規(guī)則有哪些
URL鏈接:http://weahome.cn/article/gsccsd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部