久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

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

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

          <bdo id='RRYzT'></bdo><ul id='RRYzT'></ul>

      1. MySQL 錯誤:沒有密鑰長度的密鑰規范

        MySQL error: key specification without a key length(MySQL 錯誤:沒有密鑰長度的密鑰規范)
      2. <i id='4hutz'><tr id='4hutz'><dt id='4hutz'><q id='4hutz'><span id='4hutz'><b id='4hutz'><form id='4hutz'><ins id='4hutz'></ins><ul id='4hutz'></ul><sub id='4hutz'></sub></form><legend id='4hutz'></legend><bdo id='4hutz'><pre id='4hutz'><center id='4hutz'></center></pre></bdo></b><th id='4hutz'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='4hutz'><tfoot id='4hutz'></tfoot><dl id='4hutz'><fieldset id='4hutz'></fieldset></dl></div>

        • <tfoot id='4hutz'></tfoot>

          <small id='4hutz'></small><noframes id='4hutz'>

          1. <legend id='4hutz'><style id='4hutz'><dir id='4hutz'><q id='4hutz'></q></dir></style></legend>
              <bdo id='4hutz'></bdo><ul id='4hutz'></ul>
                <tbody id='4hutz'></tbody>

                • 本文介紹了MySQL 錯誤:沒有密鑰長度的密鑰規范的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我有一個主鍵是 varchar(255) 的表.在某些情況下,255 個字符是不夠的.我嘗試將字段更改為文本,但出現以下錯誤:

                  I have a table with a primary key that is a varchar(255). Some cases have arisen where 255 characters isn't enough. I tried changing the field to a text, but I get the following error:

                  BLOB/TEXT column 'message_id' used in key specification without a key length
                  

                  我該如何解決這個問題?

                  how can I fix this?

                  我還應該指出這個表有一個多列的復合主鍵.

                  edit: I should also point out this table has a composite primary key with multiple columns.

                  推薦答案

                  發生錯誤是因為 MySQL 只能索引 BLOB 或 TEXT 列的前 N ??個字符.所以該錯誤主要發生在字段/列類型為TEXT 或BLOB 或屬于TEXTBLOB 類型如>TINYBLOBMEDIUMBLOBLONGBLOBTINYTEXTMEDIUMTEXTLONGTEXT 您嘗試創建主鍵或索引.對于沒有長度值的完整BLOBTEXT,MySQL 無法保證列的唯一性,因為它是可變的和動態的大小.因此,當使用 BLOBTEXT 類型作為索引時,必須提供 N 的值,以便 MySQL 可以確定密鑰長度.但是,MySQL 不支持 TEXTBLOB 的密鑰長度限制.TEXT(88) 根本行不通.

                  The error happens because MySQL can index only the first N chars of a BLOB or TEXT column. So The error mainly happens when there is a field/column type of TEXT or BLOB or those belong to TEXT or BLOB types such as TINYBLOB, MEDIUMBLOB, LONGBLOB, TINYTEXT, MEDIUMTEXT, and LONGTEXT that you try to make a primary key or index. With full BLOB or TEXT without the length value, MySQL is unable to guarantee the uniqueness of the column as it’s of variable and dynamic size. So, when using BLOB or TEXT types as an index, the value of N must be supplied so that MySQL can determine the key length. However, MySQL doesn’t support a key length limit on TEXT or BLOB. TEXT(88) simply won’t work.

                  當您嘗試將表列從non-TEXTnon-BLOB 類型(例如VARCHAR)轉換時,也會彈出該錯誤和 ENUM 變成 TEXTBLOB 類型,列已經定義為唯一約束或索引.更改表 SQL 命令將失敗.

                  The error will also pop up when you try to convert a table column from non-TEXT and non-BLOB type such as VARCHAR and ENUM into TEXT or BLOB type, with the column already been defined as unique constraints or index. The Alter Table SQL command will fail.

                  該問題的解決方案是從索引或唯一約束中刪除TEXTBLOB 列或將另一個字段設置為主鍵.如果您不能這樣做,并且想對 TEXTBLOB 列設置限制,請嘗試使用 VARCHAR 類型并放置一個長度限制.默認情況下,VARCHAR 被限制為最多 255 個字符,并且它的限制必須在其聲明后立即在括號內隱式指定,即 VARCHAR(200) 將限制它為僅 200 個字符長.

                  The solution to the problem is to remove the TEXT or BLOB column from the index or unique constraint or set another field as primary key. If you can't do that, and wanting to place a limit on the TEXT or BLOB column, try to use VARCHAR type and place a limit of length on it. By default, VARCHAR is limited to a maximum of 255 characters and its limit must be specified implicitly within a bracket right after its declaration, i.e VARCHAR(200) will limit it to 200 characters long only.

                  有時,即使您沒有在表格中使用 TEXTBLOB 相關類型,也可能會出現錯誤 1170.這種情況發生在您指定 VARCHAR 列作為主鍵,但錯誤地設置其長度或字符大小的情況下.VARCHAR 最多只能接受 256 個字符,因此諸如 VARCHAR(512) 之類的任何內容都會強制 MySQL 自動轉換 VARCHAR(512)SMALLTEXT 數據類型,如果該列用作主鍵或唯一或非唯一索引,則隨后失敗并在鍵長度上出現錯誤 1170.要解決此問題,請指定小于 256 的數字作為 VARCHAR 字段的大小.

                  Sometimes, even though you don’t use TEXT or BLOB related type in your table, the Error 1170 may also appear. It happens in a situation such as when you specify VARCHAR column as primary key, but wrongly set its length or characters size. VARCHAR can only accepts up to 256 characters, so anything such as VARCHAR(512) will force MySQL to auto-convert the VARCHAR(512) to a SMALLTEXT datatype, which subsequently fails with error 1170 on key length if the column is used as primary key or unique or non-unique index. To solve this problem, specify a figure less than 256 as the size for VARCHAR field.

                  參考:MySQL 錯誤 1170 (42000):BLOB/TEXT 列在沒有密鑰長度的密鑰規范中使用

                  這篇關于MySQL 錯誤:沒有密鑰長度的密鑰規范的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to use windowing functions efficiently to decide next N number of rows based on N number of previous values(如何有效地使用窗口函數根據 N 個先前值來決定接下來的 N 個行)
                  reuse the result of a select expression in the quot;GROUP BYquot; clause?(在“GROUP BY中重用選擇表達式的結果;條款?)
                  Does ignore option of Pyspark DataFrameWriter jdbc function ignore entire transaction or just offending rows?(Pyspark DataFrameWriter jdbc 函數的 ignore 選項是忽略整個事務還是只是有問題的行?) - IT屋-程序員軟件開發技
                  Error while using INSERT INTO table ON DUPLICATE KEY, using a for loop array(使用 INSERT INTO table ON DUPLICATE KEY 時出錯,使用 for 循環數組)
                  pyspark mysql jdbc load An error occurred while calling o23.load No suitable driver(pyspark mysql jdbc load 調用 o23.load 時發生錯誤 沒有合適的驅動程序)
                  How to integrate Apache Spark with MySQL for reading database tables as a spark dataframe?(如何將 Apache Spark 與 MySQL 集成以將數據庫表作為 Spark 數據幀讀取?)
                    <tbody id='J1FTW'></tbody>

                  1. <tfoot id='J1FTW'></tfoot>
                  2. <legend id='J1FTW'><style id='J1FTW'><dir id='J1FTW'><q id='J1FTW'></q></dir></style></legend>
                      <bdo id='J1FTW'></bdo><ul id='J1FTW'></ul>

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

                          1. <i id='J1FTW'><tr id='J1FTW'><dt id='J1FTW'><q id='J1FTW'><span id='J1FTW'><b id='J1FTW'><form id='J1FTW'><ins id='J1FTW'></ins><ul id='J1FTW'></ul><sub id='J1FTW'></sub></form><legend id='J1FTW'></legend><bdo id='J1FTW'><pre id='J1FTW'><center id='J1FTW'></center></pre></bdo></b><th id='J1FTW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='J1FTW'><tfoot id='J1FTW'></tfoot><dl id='J1FTW'><fieldset id='J1FTW'></fieldset></dl></div>
                          2. 主站蜘蛛池模板: 日韩av中文 | 成年无码av片在线 | 色综合一区二区三区 | 欧美精品一区二区三区四区五区 | 黄色在线播放视频 | 亚洲精品一区二区网址 | 狠狠av| 国产一区精品 | 国产精品日韩一区二区 | 亚洲三区在线 | 日日操视频 | 国产成人精品一区二区三区四区 | 国产精品免费在线 | 国产精品久久久久久模特 | 日韩国产精品一区二区三区 | 亚洲精品乱码久久久久久久久久 | 亚洲黄色视屏 | 老司机成人在线 | 天天看天天爽 | www国产亚洲精品久久网站 | 久久久国产精品一区 | 97日韩精品 | 久久精品亚洲一区二区三区浴池 | 一级黄色大片 | 久久不射电影网 | 免费一级黄色录像 | jizz视频| 欧美一级淫片007 | 久久久久久综合 | 日韩av手机在线观看 | 国产精品视频一二三区 | 国产精品自产拍 | 国产一区二区视频在线 | 日本电影网站 | 国产丝袜一区二区三区免费视频 | 久久99精品久久久久久青青日本 | 久久精品国产一区二区 | heyzo在线| 亚洲精品乱码久久久久久9色 | 亚洲精品国产电影 | 成人av一区二区三区 |