• <i id='15N0C'><tr id='15N0C'><dt id='15N0C'><q id='15N0C'><span id='15N0C'><b id='15N0C'><form id='15N0C'><ins id='15N0C'></ins><ul id='15N0C'></ul><sub id='15N0C'></sub></form><legend id='15N0C'></legend><bdo id='15N0C'><pre id='15N0C'><center id='15N0C'></center></pre></bdo></b><th id='15N0C'></th></span></q></dt></tr></i><div id='15N0C'><tfoot id='15N0C'></tfoot><dl id='15N0C'><fieldset id='15N0C'></fieldset></dl></div>
    <legend id='15N0C'><style id='15N0C'><dir id='15N0C'><q id='15N0C'></q></dir></style></legend>

    <small id='15N0C'></small><noframes id='15N0C'>

        <bdo id='15N0C'></bdo><ul id='15N0C'></ul>
    1. <tfoot id='15N0C'></tfoot>

      1. MySQL 中区分大小写的排序规则

        Case Sensitive collation in MySQL(MySQL 中区分大小写的排序规则)

        • <small id='YPLW2'></small><noframes id='YPLW2'>

            <tbody id='YPLW2'></tbody>
          1. <tfoot id='YPLW2'></tfoot>

            • <bdo id='YPLW2'></bdo><ul id='YPLW2'></ul>
                <legend id='YPLW2'><style id='YPLW2'><dir id='YPLW2'><q id='YPLW2'></q></dir></style></legend>
                <i id='YPLW2'><tr id='YPLW2'><dt id='YPLW2'><q id='YPLW2'><span id='YPLW2'><b id='YPLW2'><form id='YPLW2'><ins id='YPLW2'></ins><ul id='YPLW2'></ul><sub id='YPLW2'></sub></form><legend id='YPLW2'></legend><bdo id='YPLW2'><pre id='YPLW2'><center id='YPLW2'></center></pre></bdo></b><th id='YPLW2'></th></span></q></dt></tr></i><div id='YPLW2'><tfoot id='YPLW2'></tfoot><dl id='YPLW2'><fieldset id='YPLW2'></fieldset></dl></div>
                  本文介绍了MySQL 中区分大小写的排序规则的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  MySQL 中是否有任何支持区分大小写的排序规则类型.我在 MySQL 中有所有类型的排序规则,它们的名称末尾都有 _ci,因此它们是不区分大小写的排序规则.

                  Is there any Collation type in MySQL which supports Case Sensitive. I had all type of collation in MySQL they all have _ci at the end of their name so they are case Insensitive collation.

                  推荐答案

                  根据 MySQL 手册 http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html 你应该能够将排序规则设置为 _cs区分大小写.您可以通过执行 SHOW COLLATION WHERE COLLATION LIKE "%_cs" 查询来获取 _cs 排序规则的列表

                  According to MySQL Manual http://dev.mysql.com/doc/refman/5.0/en/charset-mysql.html you should be able to set collation to _cs for case sensitivity. You can get a list of _cs collations by executing SHOW COLLATION WHERE COLLATION LIKE "%_cs" query

                  经过一些研究:

                  显然 MySQL 中没有 utf8_*_cs(目前).如果您需要 utf8 字段区分大小写的排序规则,您应该使用 utf8_bin.这会弄乱ORDER BY,但这可以通过ORDER BY column COLLATE utf8_general_ci

                  Apparently there are no utf8_*_cs in MySQL (yet). If you need case sensitive collation for utf8 fields, you should use utf8_bin. This will mess up ORDER BY, but this can be fixed by ORDER BY column COLLATE utf8_general_ci

                  来源:http://forums.mysql.com/read.php?103,19380,200971#msg-200971 和 http://forums.mysql.com/read.php?103,156527,198794#msg-198794

                  这篇关于MySQL 中区分大小写的排序规则的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Bogus foreign key constraint fail(虚假外键约束失败)
                  how to get last insert id after insert query in codeigniter active record(如何在codeigniter活动记录中插入查询后获取最后一个插入ID)
                  Force InnoDB to recheck foreign keys on a table/tables?(强制 InnoDB 重新检查表/表上的外键?)
                  How to auto generate migrations with Sequelize CLI from Sequelize models?(如何使用 Sequelize CLI 从 Sequelize 模型自动生成迁移?)
                  Clear MySQL query cache without restarting server(无需重启服务器即可清除 MySQL 查询缓存)
                  ALTER TABLE to add a composite primary key(ALTER TABLE 添加复合主键)

                  <small id='gEupt'></small><noframes id='gEupt'>

                1. <i id='gEupt'><tr id='gEupt'><dt id='gEupt'><q id='gEupt'><span id='gEupt'><b id='gEupt'><form id='gEupt'><ins id='gEupt'></ins><ul id='gEupt'></ul><sub id='gEupt'></sub></form><legend id='gEupt'></legend><bdo id='gEupt'><pre id='gEupt'><center id='gEupt'></center></pre></bdo></b><th id='gEupt'></th></span></q></dt></tr></i><div id='gEupt'><tfoot id='gEupt'></tfoot><dl id='gEupt'><fieldset id='gEupt'></fieldset></dl></div>
                    <bdo id='gEupt'></bdo><ul id='gEupt'></ul>
                      <tbody id='gEupt'></tbody>
                    <legend id='gEupt'><style id='gEupt'><dir id='gEupt'><q id='gEupt'></q></dir></style></legend>

                      <tfoot id='gEupt'></tfoot>