Mysql insert text type field error log com.mysql.jdbc.MysqlDataTruncation: Data truncation: # 22001

Insert a following error messages

com.mysql.jdbc.MysqlDataTruncation: Data truncation: #22001

Field value is longer than said limit.

The maximum length of data types MySQL TEXT

TINYTEXT 256 bytes  
TEXT 65,535 bytes ~ 64kb
MEDIUMTEXT  16,777,215 bytes ~16MB
LONGTEXT 4,294,967,295 bytes ~4GB

 

 

 

 

 

Adjust the text field type

Guess you like

Origin www.cnblogs.com/zsg88/p/12072753.html