2017-08-29 77 views
0

我認爲mysql中沒有Clob類型。我的問題是 這是真的嗎?如果它是真的(Clob不存在於mysql中)我可以使用哪種類型來保存非常長的文本?mysql:更新表字段類型到Clob

+1

https://stackoverflow.com/questions/7071662/mysql-text-vs-blob-vs-clob – Jens

+0

你可以用'TEXT'持有與65,535個字符的最大長度的字符串。或者有一個LONGTEXT - >最大大小爲4GB或4,294,967,295個字符 – Rakib

+1

MySQL有一個數據類型TEXT或LONGTEXT –

回答

0

TEXT您可以使用TEXT OR BLOB數據類型。

BLOB or TEXT − A field with a maximum length of 65535 characters. 
BLOBs are "Binary Large Objects" and are used to store large amounts of binary data, such as images or other types of files. 
Fields defined as TEXT also hold large amounts of data. 
The difference between the two is that the sorts and comparisons on the stored data are case sensitive on BLOBs and are not case sensitive in TEXT fields. 
You do not specify a length with BLOB or TEXT.