hello i am trying to add data to mysql column but after some data has been input it throws subject mentioned error
Asked
Active
Viewed 1.4k times
3
-
3You'll probably need something bigger than a `tinytext` for that column, tinytext can only contain 255 bytes – Pevara May 12 '16 at 18:42
-
which format suits the best if i have to query the column as well and the data will be quite a bit ? – Nitin Jain May 12 '16 at 18:50
-
have a look at this question for the available sizes: http://stackoverflow.com/questions/13932750/tinytext-text-mediumtext-and-longtext-maximum-storage-sizes – Pevara May 12 '16 at 18:51
1 Answers
6
Your data is being truncated because it exceeds the 255 byte limit of a tinytext
column. You'll need to use a column type that supports more data:
Type | Maximum length -----------+------------------------------------- TINYTEXT | 255 (2 8−1) bytes TEXT | 65,535 (216−1) bytes = 64 KiB MEDIUMTEXT | 16,777,215 (224−1) bytes = 16 MiB LONGTEXT | 4,294,967,295 (232−1) bytes = 4 GiB
(from TINYTEXT, TEXT, MEDIUMTEXT, and LONGTEXT maximum storage sizes)