<bdo id='kOruK'></bdo><ul id='kOruK'></ul>
    <legend id='kOruK'><style id='kOruK'><dir id='kOruK'><q id='kOruK'></q></dir></style></legend>

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

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

      <tfoot id='kOruK'></tfoot>

        在MySQL中创建索引时索引名的意义是什么?

        What is the significance of the index name when creating an index in MySQL?(在MySQL中创建索引时索引名的意义是什么?)
        <i id='XUFTl'><tr id='XUFTl'><dt id='XUFTl'><q id='XUFTl'><span id='XUFTl'><b id='XUFTl'><form id='XUFTl'><ins id='XUFTl'></ins><ul id='XUFTl'></ul><sub id='XUFTl'></sub></form><legend id='XUFTl'></legend><bdo id='XUFTl'><pre id='XUFTl'><center id='XUFTl'></center></pre></bdo></b><th id='XUFTl'></th></span></q></dt></tr></i><div id='XUFTl'><tfoot id='XUFTl'></tfoot><dl id='XUFTl'><fieldset id='XUFTl'></fieldset></dl></div>
        <legend id='XUFTl'><style id='XUFTl'><dir id='XUFTl'><q id='XUFTl'></q></dir></style></legend>
              <tbody id='XUFTl'></tbody>
            <tfoot id='XUFTl'></tfoot>

              1. <small id='XUFTl'></small><noframes id='XUFTl'>

                  <bdo id='XUFTl'></bdo><ul id='XUFTl'></ul>
                  本文介绍了在MySQL中创建索引时索引名的意义是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  为了在重复密钥更新时使用,我做了这样的事情:

                  I've done something like this in order to use on duplicate key update:

                  CREATE UNIQUE INDEX blah on mytable(my_col_to_make_an_index);
                  

                  它工作得很好.我只是不确定索引名称的目的是什么——在这种情况下是等等".我读过的东西说要使用一个,但我不明白为什么.它似乎没有用于查询,但如果我导出架构,我可以看到它.

                  and its worked just fine. I'm just not sure what the purpose of the index name is -- in this case 'blah'. The stuff I've read says to use one but I can't fathom why. It doesn't seem to be used in queries, although I can see it if I export the schema.

                  那么……索引名称的作用是什么?如果它有助于 CREATE TABLE 中的行最终看起来像:

                  So ... what purpose does the index name serve? If it helps the line in the CREATE TABLE ends up looking like:

                  UNIQUE KEY `clothID` (`clothID`)
                  

                  推荐答案

                  索引名称用于为以后的命令引用索引.喜欢下降索引.

                  The index name is used to reference the index for future commands. Like drop index.

                  http://dev.mysql.com/doc/refman/5.0/en/drop-index.html

                  想想索引名,就像表名一样.您可以轻松制作一个名为blah"的表格.

                  Just think of index names like table names. You can just as easily make a table called 'blah'.

                  CREATE TABLE blah (f1 int);
                  

                  但是blah"对于将来的参考并不是很有帮助.只要保持一致.类似的东西

                  But 'blah' isn't very helpful for future reference. Just be consistent. something like

                  CREATE UNIQUE INDEX field_uniq on mytable(field);
                  

                  CREATE INDEX field1_field2_inx on mytable(field1, field2);
                  

                  这篇关于在MySQL中创建索引时索引名的意义是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Set the variable result, from query(设置变量结果,来自查询)
                  What is dynamic SQL?(什么是动态 SQL?)
                  Mysql - How to quit/exit from stored procedure(Mysql - 如何退出/退出存储过程)
                  Does MySQL have time-based triggers?(MySQL 有基于时间的触发器吗?)
                  is it possible to call a sql script from a stored procedure in another sql script?(是否可以从另一个 sql 脚本中的存储过程调用 sql 脚本?)
                  Procedure to loop through comma separated string is not working(遍历逗号分隔字符串的过程不起作用)
                  • <legend id='GpjrP'><style id='GpjrP'><dir id='GpjrP'><q id='GpjrP'></q></dir></style></legend>
                      <tfoot id='GpjrP'></tfoot>
                        <tbody id='GpjrP'></tbody>
                      <i id='GpjrP'><tr id='GpjrP'><dt id='GpjrP'><q id='GpjrP'><span id='GpjrP'><b id='GpjrP'><form id='GpjrP'><ins id='GpjrP'></ins><ul id='GpjrP'></ul><sub id='GpjrP'></sub></form><legend id='GpjrP'></legend><bdo id='GpjrP'><pre id='GpjrP'><center id='GpjrP'></center></pre></bdo></b><th id='GpjrP'></th></span></q></dt></tr></i><div id='GpjrP'><tfoot id='GpjrP'></tfoot><dl id='GpjrP'><fieldset id='GpjrP'></fieldset></dl></div>
                    • <small id='GpjrP'></small><noframes id='GpjrP'>

                      • <bdo id='GpjrP'></bdo><ul id='GpjrP'></ul>