mysql的text欄位長度
型別是可變長度的字串,最多65535個字元;
可以把欄位型別改成MEDIUMTEXT(最多存放16777215個字元)或者LONGTEXT(最多存放4294967295個字元).
MySQL supports 4 TEXT field types (TINYTEXT, TEXT, MEDIUMTEXT and LONGTEXT) andthis post looks at the maximum length of each of these field types.
MyISAM tables in MySQL have a maximum size of a row of 65,535 bytes, so all thedata in a row must fit within that limit. However, the TEXT types are storedoutside the table itself and only contribute 9 to 12 bytes towards that limit.(For more information about
this refer to the MySQL Manual - Data StorageRequirements chapter). TEXT data types are also able to store much more datathan VARCHAR and CHAR text types so TEXT types are what you need to use whenstoring web page or similar content in a database. The maximum
amount of datathat can be stored in each data type is as follows: TINYTEXT 256 bytes
TEXT 65,535 bytes ~64kb
MEDIUMTEXT 16,777,215 bytes ~16MB
LONGTEXT 4,294,967,295 bytes ~4GB
In most circumstancesthe TEXT type is probably sufficient, but if you are coding a contentmanagement system it's probably best to use the MEDIUMTEXT type for longerpages to ensure there are no issues with data size limits.
相關文章
- MySQL的欄位數量以及長度限制MySql
- mysql的varchar欄位最大長度真的是65535嗎?MySql
- oracle 修改表欄位的長度Oracle
- MySQL中TEXT與BLOB欄位型別的區別MySql型別
- MySQL中修改一個資料庫下包含有某個相同欄位的所有表的欄位長度MySql資料庫
- [20180613]縮短欄位長度.txt
- Oracle 修改欄位型別和長度Oracle型別
- [20210423]建立檢視以及欄位長度.txt
- MySQL 5.6使用pt-online-schema-change線上修改大表欄位長度MySql
- 欄位長度前後端是否都需要做限制?後端
- ORANCLE 資料已存在,修改欄位型別長度型別
- MySQL欄位的取值範圍MySql
- 資料庫text型別的長度?資料庫型別
- MySQL 欄位約束MySql
- MySQL欄位新增註釋,但不改變欄位的型別MySql型別
- MySQL VARCHAR型別欄位到底可以定義多長MySql型別
- [BUG反饋]username欄位的長度設定有點小問題。
- DDL操作導致欄位長度變更修復方案
- MySQL 中 JSON 欄位的使用技巧MySqlJSON
- MySQL中JSON欄位的使用技巧MySqlJSON
- MySQL-刪除欄位MySql
- MySQL 欄位擷取拼接MySql
- MySQL 大欄位問題MySql
- 要慎用mysql的enum欄位的原因MySql
- OGG複製同步,提示欄位長度不夠ORA-01704
- MySQL-去掉不為null的欄位MySqlNull
- 5_MySQL 表的欄位約束MySql
- mysql表操作(alter)/mysql欄位型別MySql型別
- 地理位置經緯度在Mysql中用什麼欄位型別MySql型別
- MySQL-建立計算欄位MySql
- MySQL欄位型別最全解析MySql型別
- 美創科技運維日記|Oracle欄位長度引起的思考length()和lengthb()運維Oracle
- MySQL 更新一個表裡的欄位等於另一個表某欄位的值MySql
- mysql基礎 依據一個欄位查詢另外一個欄位存在不同的值MySql
- MySQL null值欄位是否使用索引的總結MySqlNull索引
- MySQL多列欄位去重的案例實踐MySql
- PHP 操作 mysql blob 資料型別的欄位PHPMySql資料型別
- mysql-資料庫欄位date datetimeMySql資料庫
- MySQL5.7密碼欄位變更MySql密碼