Comparison with MSSQL MYSQL learning experience (IV) BLOB data type

  • 2020-06-19 11:51:01
  • OfStack

BLOB data types in MYSQL

BLOB is a large binary object that stores a variable amount of data. There are four types of BLOB: TinyBlob, Blob, MediumBlob, LongBlob,

The only difference between these types is the maximum size of the file to be stored.

4 TYPES of BLOB Type Size (in bytes)

TinyBlob maximum 255
65 K Blob biggest
16 M MediumBlob biggest
4 G LongBlob biggest

Column BLOB stores a binary string (byte string); The TEXT column stores non-binary strings (character strings).

The BLOB column has no character set and sorts and compares values based on column value bytes; The TEXT column has one character set, and the values are sorted and compared according to the character set

BLOB is a binary string and TEXT is a non-binary string, both of which can hold a large amount of information. BLOB mainly stores pictures and audio information, etc.

TEXT can only store text files.

SQLSERVER

SQLSERVER does not have BLOB data types, only large object data types (LOB) :

text ntext, image, nvarchar (max), varchar (max), varbinary (max) and xml data types

These data types are stored in the LOB data page


Related articles: