Learning about Mysql in comparison with MSSQL (IV.)--blob data type _mysql

Source: Internet
Author: User
Tags mssql mysql in

BLOB data type in MySQL

A blob is a binary large object that is used to store variable amounts of data. Blob types are divided into 4 kinds: tinyblob, blobs, Mediumblob, Longblob,

The only difference between these types is that they differ in the maximum size of the storage file.

MySQL four blob type type size (in bytes)

Tinyblob Max 255
Blob Max 65K
Mediumblob Max 16M
Longblob Max 4G

A BLOB column stores a binary string (a byte string); A text column stores a non-binary string (a character string).

Blob columns have no character set, and sort and compare values based on column-value bytes; The text column has a character set, and the values are sorted and compared based on the character set

A blob is a binary string, and text is a non binary string, both of which can hold large volumes of information. BLOBs mainly store pictures, audio information, etc.

Text can only be stored in a literal file.

Sql server

SQL Server does not have a BLOB data type, only large object data types (lobs):

Text,ntext,image,nvarchar (max), varchar (max), varbinary (max), and XML data type

Data of these data types are stored in LOB-type data pages

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.