Mysql2::Error:Data too long for column 'hoge' at row1
I'm in trouble because I got this kind of error.
hoge
is text type, so I thought there was no limit...
By the way, the data that failed this time was about 67441 characters including full-width half-width characters.
What type of data should I use if I can't handle text?
mysql
The manual says:
https://dev.mysql.com/doc/refman/5.6/ja/string-type-overview.html
TEXT column with a maximum length of 65,535 (216-1) characters.If the value contains multi-byte characters, the maximum valid length is less.
It's a complicated way to write, but the bottom line is 65,535 bytes.
If TEXT is not enough, you can use MEDIUMTEXT (16,777,215 bytes) and LONGTEXT (4,294,967,295 bytes).
There is no data type without a limit.
574 Who developed the "avformat-59.dll" that comes with FFmpeg?
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
582 PHP ssh2_scp_send fails to send files as intended
578 Understanding How to Configure Google API Key
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.