Reputation: 155
I want to set the maximal size of a BLOB column to be up to 900KB.
Is there a way similar to the syntax of the other String Data types - for example
c CHAR(7),
vc VARCHAR(50),
pic BLOB (???)
to do this?
Upvotes: 1
Views: 6283
Reputation: 28629
From the storage requirements section of the manual, the max size of the fields are as follows:
Field | Length | Bytes |
---|---|---|
TINYBLOB | L < 2^8 | 256 |
BLOB | L < 2^16 | 65,536 |
MEDIUMBLOB | L < 2^24 | 16,777,216 |
LONGBLOB | L < 2^32 | 4,294,967,296 |
In order to store 900KB, you would need to use a MEDIUMBLOB
at the very minimum.
As far as I know, you cannot specify your own size for the field.
Upvotes: 5
Reputation: 1
With our IBM Database (AS400), it is possible to provide a size to a Blob field.
fieldName Blob(size in bytes)
The maximum Size is then visible like any other length
Screenshot from DBvisualizer:
Upvotes: -2