Home > Database > Mysql Tutorial > What are the size limits for BLOB, MEDIUMBLOB, and LONGBLOB data types in MySQL?

What are the size limits for BLOB, MEDIUMBLOB, and LONGBLOB data types in MySQL?

Linda Hamilton
Release: 2024-12-14 00:19:09
Original
901 people have browsed it

What are the size limits for BLOB, MEDIUMBLOB, and LONGBLOB data types in MySQL?

MySQL BLOB Column Data Length Limits

The maximum data length that can be stored in a BLOB (Binary Large OBject) column in MySQL is 65535 bytes, equivalent to 64 KB. This length applies to the BLOB data before compression, as MySQL compresses BLOB data by default.

If you require storing larger data volumes, consider using these extended data types:

  • MEDIUMBLOB: Can hold up to 16777215 bytes (16 MB) of data.
  • LONGBLOB: Suitable for storing data up to 4294967295 bytes (4 GB).

For further details on storage requirements for string types in MySQL, consult the "Storage Requirements for String Types" documentation.

The above is the detailed content of What are the size limits for BLOB, MEDIUMBLOB, and LONGBLOB data types in MySQL?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template