3

hello i am trying to add data to mysql column but after some data has been input it throws subject mentioned error

The structure is enter image description here

the column data format is enter image description here

Nitin Jain
  • 93
  • 1
  • 1
  • 10
  • 3
    You'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 Answers1

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)

Community
  • 1
  • 1
Pevara
  • 14,242
  • 1
  • 34
  • 47