• <bdo id='Ihhty'></bdo><ul id='Ihhty'></ul>
    1. <small id='Ihhty'></small><noframes id='Ihhty'>

    2. <tfoot id='Ihhty'></tfoot>
    3. <legend id='Ihhty'><style id='Ihhty'><dir id='Ihhty'><q id='Ihhty'></q></dir></style></legend>

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

        索引 MySql TEXT 列?

        Indexing a MySql TEXT column?(索引 MySql TEXT 列?)

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

                  <tbody id='0O9kV'></tbody>
                • <bdo id='0O9kV'></bdo><ul id='0O9kV'></ul>

                  <small id='0O9kV'></small><noframes id='0O9kV'>

                • <tfoot id='0O9kV'></tfoot>
                • 本文介绍了索引 MySql TEXT 列?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我使用 MySql 运行它,但它似乎不喜欢 TEXT.对于 SQL 服务器,我使用 nvarchar(max) 我应该在 MySql 中使用什么?在其他表格中,一些字段将是描述并且可能很长,所以目前我认为固定长度是不好的.

                  I ran this using MySql and it appears to not like TEXT. With SQL server I use nvarchar(max) What should I use in MySql? In other tables some fields will be descriptions and may be long so at the moment I am thinking that fixed length is bad.

                  create table if not exists 
                      misc_info (
                          id INTEGER PRIMARY KEY AUTO_INCREMENT NOT NULL,
                          key TEXT UNIQUE NOT NULL,
                          value TEXT NOT NULL
                      )ENGINE=INNODB;
                  

                  推荐答案

                  MySQL 中的文本列不能有 UNIQUE 索引.

                  You can't have a UNIQUE index on a text column in MySQL.

                  如果要在 TEXT 或 BLOB 字段上建立索引,则必须指定固定长度才能做到这一点.

                  If you want to index on a TEXT or a BLOB field, you must specify a fixed length to do that.

                  来自 MySQL 文档:

                  BLOB 和 TEXT 列也可以索引,但前缀长度必须是给.

                  BLOB and TEXT columns also can be indexed, but a prefix length must be given.

                  示例:

                  CREATE UNIQUE INDEX index_name ON misc_info (key(10));
                  

                  这篇关于索引 MySql TEXT 列?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  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(遍历逗号分隔字符串的过程不起作用)
                    <tbody id='ho1A2'></tbody>

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

                      1. <legend id='ho1A2'><style id='ho1A2'><dir id='ho1A2'><q id='ho1A2'></q></dir></style></legend>

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