Need help regarding data types in mySQL

Asked By 0 points N/A Posted on -
qa-featured

Hi guys ,

I need your help to select the most appropriate data type in mysql to store a large body of textual information

SHARE
Best Answer by Luker Malcom
Answered By 0 points N/A #94436

Need help regarding data types in mySQL

qa-featured

Hi,

In mysql you can store data as your preferable size.  If your textual information within 64KB then you use “TEXT” attribute. If your  textual information is more than 64KB then you should use “MEDIUMTEXT”. If you have a very large textual information and you want to use it then use “LONGTEXT”. Hope your problem will be solved. Thanks

Best Answer
Best Answer
Answered By 0 points N/A #94437

Need help regarding data types in mySQL

qa-featured

Hi there. So you’re doing a blog or an informative website perhaps? If you’ve got a bulk of text information (character strings) that you want to store in mysql, then you can choose either of the following 2:

MEDIUMTEXT – this data type can hold up to 16,777,215 bytes (that’s 16 MB of characters)

LONGTEXT – this data type can hold up to 4,294,967,295 bytes (4 GB of characters)

In some cases, BLOB (Binary Large Objects) is used. BLOB types actually hold the same amount of bytes like TEXT but this is often used for binary such as images or files other than character strings. Hopefully my answer can help you decide.

Login/Register to Answer

Related Questions