Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the maximum length of data I can put in a BLOB column in MySQL?

Tags:

mysql

blob

What is the maximum length of data I can put in a BLOB column in MySQL?

like image 342
Newy Avatar asked Oct 12 '22 17:10

Newy


People also ask

How much data can BLOB hold?

Default. A BLOB without a specified length is defaulted to two gigabytes (2,147,483,647).

What is max size for BLOB in SQL Server?

A BLOB can be 65535 bytes (64 KB) maximum. If you need more consider using: a MEDIUMBLOB for 16777215 bytes (16 MB) a LONGBLOB for 4294967295 bytes (4 GB).

What is long BLOB in MySQL?

LONGBLOB: A binary large object column with a maximum length of 4294967295 (2^32 - 1) bytes, or 4GB in storage. Each LONGBLOB value is stored using a four-byte length prefix that indicates the number of bytes in the value.

How do I check my BLOB size?

GetLength – Find the size of BLOB/CLOB column. This is simply how to find the size of individual rows with the CLOB/BLOB column. DBMS_LOB. GetLength returns the number of characters (bytes) in the CLOB/BLOB column.


1 Answers

A BLOB can be 65535 bytes (64 KB) maximum.

If you need more consider using:

  • a MEDIUMBLOB for 16777215 bytes (16 MB)

  • a LONGBLOB for 4294967295 bytes (4 GB).

See Storage Requirements for String Types for more info.

like image 271
WhiteFang34 Avatar answered Oct 17 '22 02:10

WhiteFang34